diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-09-14 14:32:04 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-09-26 14:46:23 +0200 |
commit | 148eb13c84cccd0eedd6e59f90e0151bd7bac9fa (patch) | |
tree | 13526851fbf2d390a943d1c4379eb43680e60e36 /include/block | |
parent | 3121fb45b004ea85fb3589368ea699f32e6ef832 (diff) | |
download | qemu-148eb13c84cccd0eedd6e59f90e0151bd7bac9fa.zip qemu-148eb13c84cccd0eedd6e59f90e0151bd7bac9fa.tar.gz qemu-148eb13c84cccd0eedd6e59f90e0151bd7bac9fa.tar.bz2 |
block: Base permissions on rw state after reopen
When new permissions are calculated during bdrv_reopen(), they need to
be based on the state of the graph as it will be after the reopen has
completed, not on the current state of the involved nodes.
This patch makes bdrv_is_writable() optionally accept a BlockReopenQueue
from which the new flags are taken. This is then used for determining
the new bs->file permissions of format drivers as soon as we add the
code to actually pass a non-NULL reopen queue to the .bdrv_child_perm
callbacks.
While moving bdrv_is_writable(), make it static. It isn't used outside
block.c.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index 2ad1877..082eb2c 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -435,7 +435,6 @@ int bdrv_is_allocated_above(BlockDriverState *top, BlockDriverState *base, int64_t offset, int64_t bytes, int64_t *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, bool ignore_allow_rdw, Error **errp); int bdrv_set_read_only(BlockDriverState *bs, bool read_only, Error **errp); |