Signed-off-by: Fam Zheng <f...@redhat.com> --- block.c | 5 +++++ include/block/block.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c index 153f9d2..1b42303 100644 --- a/block.c +++ b/block.c @@ -879,6 +879,11 @@ static int bdrv_unlock_image(BlockDriverState *bs) return bdrv_lock_unlock_image_do(bs, false); } +bool bdrv_image_locked(BlockDriverState *bs) +{ + return bs->image_locked; +} + static QemuOptsList bdrv_runtime_opts = { .name = "bdrv_common", .head = QTAILQ_HEAD_INITIALIZER(bdrv_runtime_opts.head), diff --git a/include/block/block.h b/include/block/block.h index 14f7300..7a7dfb5 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -283,7 +283,7 @@ int bdrv_drop_intermediate(BlockDriverState *active, BlockDriverState *top, BlockDriverState *bdrv_find_overlay(BlockDriverState *active, BlockDriverState *bs); BlockDriverState *bdrv_find_base(BlockDriverState *bs); - +bool bdrv_image_locked(BlockDriverState *bs); typedef struct BdrvCheckResult { int corruptions; -- 2.8.2