@@ -368,6 +368,7 @@ static BlockDriver bdrv_blkverify = {
.bdrv_detach_aio_context = blkverify_detach_aio_context,
.is_filter = true,
+ .supports_multiple_children = true,
.bdrv_recurse_is_first_non_filter = blkverify_recurse_is_first_non_filter,
};
@@ -1087,6 +1087,7 @@ static BlockDriver bdrv_quorum = {
.bdrv_attach_aio_context = quorum_attach_aio_context,
.is_filter = true,
+ .supports_multiple_children = true,
.bdrv_recurse_is_first_non_filter = quorum_recurse_is_first_non_filter,
};
@@ -2244,6 +2244,7 @@ static BlockDriver bdrv_vmdk = {
.bdrv_attach_aio_context = vmdk_attach_aio_context,
.supports_backing = true,
+ .supports_multiple_children = true,
.create_opts = &vmdk_create_opts,
};
@@ -104,6 +104,12 @@ struct BlockDriver {
/* Set if a driver can support backing files */
bool supports_backing;
+ /* Set to true if the BlockDriver supports multiple children.
+ * (quorum, blkverify, vmdk)
+ * This field being true will disable some block layer operations.
+ */
+ bool supports_multiple_children;
+
/* For handling image reopen for split or non-split files */
int (*bdrv_reopen_prepare)(BDRVReopenState *reopen_state,
BlockReopenQueue *queue, Error **errp);
The recursive op blocker patch to come will take an optional base argument which will not have any meaning when an intermediary BDS driver of the graph support multiple children. Flag such drivers to be able to handle this case. CC: Jeff Cody <jcody@redhat.com> Signed-off-by: Benoît Canet <benoit.canet@nodalink.com> --- block/blkverify.c | 1 + block/quorum.c | 1 + block/vmdk.c | 1 + include/block/block_int.h | 6 ++++++ 4 files changed, 9 insertions(+)