@@ -891,6 +891,20 @@ void blk_drain(BlockBackend *blk)
}
}
+void blk_drained_begin(BlockBackend *blk)
+{
+ if (blk->bs) {
+ bdrv_drained_begin(blk->bs);
+ }
+}
+
+void blk_drained_end(BlockBackend *blk)
+{
+ if (blk->bs) {
+ bdrv_drained_end(blk->bs);
+ }
+}
+
void blk_drain_all(void)
{
bdrv_drain_all();
@@ -128,6 +128,8 @@ int blk_co_flush(BlockBackend *blk);
int blk_flush(BlockBackend *blk);
int blk_flush_all(void);
void blk_drain(BlockBackend *blk);
+void blk_drained_begin(BlockBackend *blk);
+void blk_drained_end(BlockBackend *blk);
void blk_drain_all(void);
void blk_set_on_error(BlockBackend *blk, BlockdevOnError on_read_error,
BlockdevOnError on_write_error);
They forward the call to bdrv_* counterparts. Signed-off-by: Fam Zheng <famz@redhat.com> --- block/block-backend.c | 14 ++++++++++++++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 16 insertions(+)