From: "Benoît Canet" <benoit.canet@nodalink.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, jcody@redhat.com,
"Benoît Canet" <benoit.canet@nodalink.com>,
stefanha@redhat.com
Subject: [Qemu-devel] [PATCH 1/2] block: Introduce a BlockDriver field to flag drivers supporting multiple children
Date: Mon, 15 Sep 2014 16:21:19 +0200 [thread overview]
Message-ID: <1410790880-21861-2-git-send-email-benoit.canet@nodalink.com> (raw)
In-Reply-To: <1410790880-21861-1-git-send-email-benoit.canet@nodalink.com>
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(+)
diff --git a/block/blkverify.c b/block/blkverify.c
index 163064c..13f8359 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -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,
};
diff --git a/block/quorum.c b/block/quorum.c
index 093382e..a4d11eb 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -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,
};
diff --git a/block/vmdk.c b/block/vmdk.c
index a1cb911..933a57d 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -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,
};
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 8a61215..b653e48 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -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);
--
2.1.0
next prev parent reply other threads:[~2014-09-15 14:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 14:21 [Qemu-devel] [PATCH 0/2] Handle interferences between multiple children drivers and stream and commit Benoît Canet
2014-09-15 14:21 ` Benoît Canet [this message]
2014-09-15 14:21 ` [Qemu-devel] [PATCH 2/2] block: commit and stream return an error when a subtree is found Benoît Canet
2014-09-19 4:35 ` [Qemu-devel] [PATCH 0/2] Handle interferences between multiple children drivers and stream and commit Jeff Cody
2014-09-19 14:08 ` Benoît Canet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410790880-21861-2-git-send-email-benoit.canet@nodalink.com \
--to=benoit.canet@nodalink.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).