mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: add blk_in_drain() API
The BlockBackend quiesce_counter is greater than zero during drained sections. Add an API to check whether the BlockBackend is in a drained section. The next patch will use this API. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230516190238.8401-10-stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
9998f70f66
commit
ff82b7835b
2 changed files with 8 additions and 0 deletions
|
@ -81,6 +81,7 @@ void blk_activate(BlockBackend *blk, Error **errp);
|
|||
int blk_make_zero(BlockBackend *blk, BdrvRequestFlags flags);
|
||||
void blk_aio_cancel(BlockAIOCB *acb);
|
||||
int blk_commit_all(void);
|
||||
bool blk_in_drain(BlockBackend *blk);
|
||||
void blk_drain(BlockBackend *blk);
|
||||
void blk_drain_all(void);
|
||||
void blk_set_on_error(BlockBackend *blk, BlockdevOnError on_read_error,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue