diff options
author | Kevin Wolf | 2017-05-04 18:52:40 +0200 |
---|---|---|
committer | Kevin Wolf | 2017-05-11 12:08:24 +0200 |
commit | 9c5e6594f15b7364624a3ad40306c396c93a2145 (patch) | |
tree | 61a8a8ad77a1ff3f54a091098070e56df04dc122 /include/block/block.h | |
parent | block: Inactivate parents before children (diff) | |
download | qemu-9c5e6594f15b7364624a3ad40306c396c93a2145.tar.gz qemu-9c5e6594f15b7364624a3ad40306c396c93a2145.tar.xz qemu-9c5e6594f15b7364624a3ad40306c396c93a2145.zip |
block: Fix write/resize permissions for inactive images
Format drivers for inactive nodes don't need write/resize permissions on
their bs->file and can share write/resize with another VM (in fact, this
is the whole point of keeping images inactive). Represent this fact in
the op blocker system, so that image locking does the right thing
without special-casing inactive images.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h index 80d51d8f12..90932b4709 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -435,6 +435,7 @@ int bdrv_is_allocated_above(BlockDriverState *top, BlockDriverState *base, int64_t sector_num, int nb_sectors, int *pnum); 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_set_read_only(BlockDriverState *bs, bool read_only, Error **errp); bool bdrv_is_sg(BlockDriverState *bs); |