aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-09-14 12:47:11 +0200
committerKevin Wolf <kwolf@redhat.com>2017-09-26 14:46:23 +0200
commite0995dc3da0894d0a8260bddaa200a4cd7809ba4 (patch)
tree6c73c497bd2d3700feed9061a1ef4f3dc03cc7f4 /include/block
parentf3adefb2cea1c63b7b198acaef5e40eb4b2d2d39 (diff)
downloadqemu-e0995dc3da0894d0a8260bddaa200a4cd7809ba4.zip
qemu-e0995dc3da0894d0a8260bddaa200a4cd7809ba4.tar.gz
qemu-e0995dc3da0894d0a8260bddaa200a4cd7809ba4.tar.bz2
block: Add reopen_queue to bdrv_child_perm()
In the context of bdrv_reopen(), we'll have to look at the state of the graph as it will be after the reopen. This interface addition is in preparation for the change. 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_int.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ba4c383..99abe2c 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -411,9 +411,14 @@ struct BlockDriver {
*
* If @c is NULL, return the permissions for attaching a new child for the
* given @role.
+ *
+ * If @reopen_queue is non-NULL, don't return the currently needed
+ * permissions, but those that will be needed after applying the
+ * @reopen_queue.
*/
void (*bdrv_child_perm)(BlockDriverState *bs, BdrvChild *c,
const BdrvChildRole *role,
+ BlockReopenQueue *reopen_queue,
uint64_t parent_perm, uint64_t parent_shared,
uint64_t *nperm, uint64_t *nshared);
@@ -983,6 +988,7 @@ int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared,
* all children */
void bdrv_filter_default_perms(BlockDriverState *bs, BdrvChild *c,
const BdrvChildRole *role,
+ BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared);
@@ -992,6 +998,7 @@ void bdrv_filter_default_perms(BlockDriverState *bs, BdrvChild *c,
* CONSISTENT_READ and doesn't share WRITE. */
void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c,
const BdrvChildRole *role,
+ BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared);