diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-01-17 13:39:34 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-02-28 20:40:37 +0100 |
commit | 26de9438c1b6013532fb95de0720e2696588332f (patch) | |
tree | fa22c8be003d452f226f4099dec3cc82f198d3f6 /include/block | |
parent | d083319fe007e100b38995d0ea254845c8efa433 (diff) |
block: Add BdrvChildRole.stay_at_node
When the parents' child links are updated in bdrv_append() or
bdrv_replace_in_backing_chain(), this should affect all child links of
BlockBackends or other nodes, but not on child links held for other
purposes (like for setting permissions). This patch allows to control
the behaviour per BdrvChildRole.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block_int.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 3177b9f496..a0d9328b59 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -441,6 +441,10 @@ typedef struct BdrvAioNotifier { } BdrvAioNotifier; struct BdrvChildRole { + /* If true, bdrv_replace_in_backing_chain() doesn't change the node this + * BdrvChild points to. */ + bool stay_at_node; + void (*inherit_options)(int *child_flags, QDict *child_options, int parent_flags, QDict *parent_options); |