Forward the call to bdrv_op_blocker_add_notifier. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> --- block/block-backend.c | 6 ++++++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 8 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c index 93e46f3..16efe60 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -802,6 +802,12 @@ void blk_op_unblock_all(BlockBackend *blk, Error *reason) bdrv_op_unblock_all(blk->bs, reason); } +void blk_op_blocker_add_notifier(BlockBackend *blk, + Notifier *notifier) +{ + bdrv_op_blocker_add_notifier(blk->bs, notifier); +} + AioContext *blk_get_aio_context(BlockBackend *blk) { return bdrv_get_aio_context(blk->bs); diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index b4a4d5e..cde9651 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -136,6 +136,8 @@ int blk_get_flags(BlockBackend *blk); int blk_get_max_transfer_length(BlockBackend *blk); void blk_set_guest_block_size(BlockBackend *blk, int align); void *blk_blockalign(BlockBackend *blk, size_t size); +void blk_op_blocker_add_notifier(BlockBackend *blk, + Notifier *notifier); bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp); void blk_op_unblock(BlockBackend *blk, BlockOpType op, Error *reason); void blk_op_block_all(BlockBackend *blk, Error *reason); -- 2.4.1