From 54a32bfec140e03ebb19863db944b1c81e4df25e Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 3 Aug 2017 17:02:58 +0200 Subject: block: Allow reopen rw without BDRV_O_ALLOW_RDWR BDRV_O_ALLOW_RDWR is a flag that tells whether qemu can internally reopen a node read-write temporarily because the user requested read-write for the top-level image, but qemu decided that read-only is enough for this node (a backing file). bdrv_reopen() is different, it is also used for cases where the user changed their mind and wants to update the options. There is no reason to forbid making a node read-write in that case. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Jeff Cody Reviewed-by: John Snow --- include/block/block.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/block') diff --git a/include/block/block.h b/include/block/block.h index 34770bb..ab80195 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -436,7 +436,8 @@ int bdrv_is_allocated_above(BlockDriverState *top, BlockDriverState *base, bool bdrv_is_read_only(BlockDriverState *bs); bool bdrv_is_writable(BlockDriverState *bs); -int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only, Error **errp); +int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only, + bool ignore_allow_rdw, Error **errp); int bdrv_set_read_only(BlockDriverState *bs, bool read_only, Error **errp); bool bdrv_is_sg(BlockDriverState *bs); bool bdrv_is_inserted(BlockDriverState *bs); -- cgit v1.1