From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v2 6/9] block: Add bdrv_drained_end_no_poll()
Date: Wed, 19 Jun 2019 17:26:00 +0200 [thread overview]
Message-ID: <20190619152603.5937-7-mreitz@redhat.com> (raw)
In-Reply-To: <20190619152603.5937-1-mreitz@redhat.com>
In contrast to bdrv_drained_end(), which does poll and may thus lead to
graph changes, this new interface to bdrv_do_drained_end() will not
poll.
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
include/block/block.h | 12 +++++++++++-
block/io.c | 5 +++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/block/block.h b/include/block/block.h
index d98237f0f1..422448d773 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -680,10 +680,20 @@ void bdrv_subtree_drained_begin(BlockDriverState *bs);
/**
* bdrv_drained_end:
*
- * End a quiescent section started by bdrv_drained_begin().
+ * End a quiescent section started by bdrv_drained_begin(). This may
+ * result in block graph changes.
*/
void bdrv_drained_end(BlockDriverState *bs);
+/**
+ * bdrv_drained_end_no_poll:
+ *
+ * Same as bdrv_drained_end(), but do not poll for the subgraph to
+ * actually become unquiesced. Therefore, no graph changes will occur
+ * with this function.
+ */
+void bdrv_drained_end_no_poll(BlockDriverState *bs);
+
/**
* End a quiescent section started by bdrv_subtree_drained_begin().
*/
diff --git a/block/io.c b/block/io.c
index 5f30baa8e5..188dea22bc 100644
--- a/block/io.c
+++ b/block/io.c
@@ -539,6 +539,11 @@ void bdrv_drained_end(BlockDriverState *bs)
bdrv_do_drained_end(bs, false, NULL, false, true, NULL);
}
+void bdrv_drained_end_no_poll(BlockDriverState *bs)
+{
+ bdrv_do_drained_end(bs, false, NULL, false, false, NULL);
+}
+
void bdrv_subtree_drained_end(BlockDriverState *bs)
{
bdrv_do_drained_end(bs, true, NULL, false, true, NULL);
--
2.21.0
next prev parent reply other threads:[~2019-06-19 15:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 15:25 [Qemu-devel] [PATCH v2 0/9] block: Delay poll when ending drained sections Max Reitz
2019-06-19 15:25 ` [Qemu-devel] [PATCH v2 1/9] block: Introduce BdrvChild.parent_quiesce_counter Max Reitz
2019-06-19 15:25 ` [Qemu-devel] [PATCH v2 2/9] block: Add @data_objs to bdrv_drain_invoke() Max Reitz
2019-06-19 15:25 ` [Qemu-devel] [PATCH v2 3/9] block: Add bdrv_poll_drain_data_objs() Max Reitz
2019-06-19 15:25 ` [Qemu-devel] [PATCH v2 4/9] block: Move polling out of bdrv_drain_invoke() Max Reitz
2019-06-19 15:25 ` [Qemu-devel] [PATCH v2 5/9] block: Add @poll to bdrv_parent_drained_end_single() Max Reitz
2019-06-19 15:26 ` Max Reitz [this message]
2019-06-19 15:26 ` [Qemu-devel] [PATCH v2 7/9] block: Fix BDS children's .drained_end() Max Reitz
2019-06-19 15:26 ` [Qemu-devel] [PATCH v2 8/9] iotests: Add @has_quit to vm.shutdown() Max Reitz
2019-06-19 15:26 ` [Qemu-devel] [PATCH v2 9/9] iotests: Test commit with a filter on the chain Max Reitz
2019-07-15 13:24 ` [Qemu-devel] [PATCH v2 0/9] block: Delay poll when ending drained sections Max Reitz
2019-07-16 14:40 ` Kevin Wolf
2019-07-16 16:24 ` Max Reitz
2019-07-16 16:37 ` Kevin Wolf
2019-07-17 13:20 ` Max Reitz
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=20190619152603.5937-7-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--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).