From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, eesposit@redhat.com, stefanha@redhat.com,
hreitz@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: [PATCH 13/13] block: Remove poll parameter from bdrv_parent_drained_begin_single()
Date: Tue, 8 Nov 2022 13:37:38 +0100 [thread overview]
Message-ID: <20221108123738.530873-14-kwolf@redhat.com> (raw)
In-Reply-To: <20221108123738.530873-1-kwolf@redhat.com>
All callers of bdrv_parent_drained_begin_single() pass poll=false now,
so we don't need the parameter any more.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/block/block-io.h | 5 ++---
block.c | 4 ++--
block/io.c | 7 ++-----
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/include/block/block-io.h b/include/block/block-io.h
index ddce8550a9..35669f0e62 100644
--- a/include/block/block-io.h
+++ b/include/block/block-io.h
@@ -285,10 +285,9 @@ bdrv_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos);
/**
* bdrv_parent_drained_begin_single:
*
- * Begin a quiesced section for the parent of @c. If @poll is true, wait for
- * any pending activity to cease.
+ * Begin a quiesced section for the parent of @c.
*/
-void bdrv_parent_drained_begin_single(BdrvChild *c, bool poll);
+void bdrv_parent_drained_begin_single(BdrvChild *c);
/**
* bdrv_parent_drained_poll_single:
diff --git a/block.c b/block.c
index 12039e9b8a..c200f7afa0 100644
--- a/block.c
+++ b/block.c
@@ -2409,7 +2409,7 @@ static void bdrv_replace_child_abort(void *opaque)
* new_bs drained when calling bdrv_replace_child_tran() is not a
* requirement any more.
*/
- bdrv_parent_drained_begin_single(s->child, false);
+ bdrv_parent_drained_begin_single(s->child);
assert(!bdrv_parent_drained_poll_single(s->child));
}
assert(s->child->parent_quiesce_counter);
@@ -3016,7 +3016,7 @@ static BdrvChild *bdrv_attach_child_common(BlockDriverState *child_bs,
* bdrv_replace_child_noperm() will undrain it if the child node is not
* drained. The child was only just created, so polling is not necessary.
*/
- bdrv_parent_drained_begin_single(new_child, false);
+ bdrv_parent_drained_begin_single(new_child);
bdrv_replace_child_noperm(new_child, child_bs);
BdrvAttachChildCommonState *s = g_new(BdrvAttachChildCommonState, 1);
diff --git a/block/io.c b/block/io.c
index d0f641926f..9bcb19e5ee 100644
--- a/block/io.c
+++ b/block/io.c
@@ -53,7 +53,7 @@ static void bdrv_parent_drained_begin(BlockDriverState *bs, BdrvChild *ignore)
if (c == ignore) {
continue;
}
- bdrv_parent_drained_begin_single(c, false);
+ bdrv_parent_drained_begin_single(c);
}
}
@@ -103,7 +103,7 @@ static bool bdrv_parent_drained_poll(BlockDriverState *bs, BdrvChild *ignore)
return busy;
}
-void bdrv_parent_drained_begin_single(BdrvChild *c, bool poll)
+void bdrv_parent_drained_begin_single(BdrvChild *c)
{
IO_OR_GS_CODE();
assert(c->parent_quiesce_counter == 0);
@@ -111,9 +111,6 @@ void bdrv_parent_drained_begin_single(BdrvChild *c, bool poll)
if (c->klass->drained_begin) {
c->klass->drained_begin(c);
}
- if (poll) {
- BDRV_POLL_WHILE(c->bs, bdrv_parent_drained_poll_single(c));
- }
}
static void bdrv_merge_limits(BlockLimits *dst, const BlockLimits *src)
--
2.38.1
next prev parent reply other threads:[~2022-11-08 12:53 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 12:37 [PATCH 00/13] block: Simplify drain Kevin Wolf
2022-11-08 12:37 ` [PATCH 01/13] qed: Don't yield in bdrv_qed_co_drain_begin() Kevin Wolf
2022-11-09 9:21 ` Vladimir Sementsov-Ogievskiy
2022-11-09 9:27 ` Vladimir Sementsov-Ogievskiy
2022-11-09 12:22 ` Kevin Wolf
2022-11-09 21:49 ` Stefan Hajnoczi
2022-11-10 11:07 ` Kevin Wolf
2022-11-11 11:14 ` Emanuele Giuseppe Esposito
2022-11-14 18:16 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 02/13] test-bdrv-drain: Don't yield in .bdrv_co_drained_begin/end() Kevin Wolf
2022-11-09 10:50 ` Vladimir Sementsov-Ogievskiy
2022-11-09 12:28 ` Kevin Wolf
2022-11-09 13:45 ` Vladimir Sementsov-Ogievskiy
2022-11-11 11:14 ` Emanuele Giuseppe Esposito
2022-11-14 18:16 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine_fn Kevin Wolf
2022-11-09 14:29 ` Vladimir Sementsov-Ogievskiy
2022-11-09 22:13 ` Stefan Hajnoczi
2022-11-11 11:14 ` Emanuele Giuseppe Esposito
2022-11-14 18:17 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 04/13] block: Remove drained_end_counter Kevin Wolf
2022-11-09 14:44 ` Vladimir Sementsov-Ogievskiy
2022-11-11 16:37 ` Kevin Wolf
2022-11-11 11:15 ` Emanuele Giuseppe Esposito
2022-11-14 18:19 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 05/13] block: Inline bdrv_drain_invoke() Kevin Wolf
2022-11-09 15:34 ` Vladimir Sementsov-Ogievskiy
2022-11-10 19:48 ` Stefan Hajnoczi
2022-11-11 11:15 ` Emanuele Giuseppe Esposito
2022-11-14 18:19 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 06/13] block: Drain invidual nodes during reopen Kevin Wolf
2022-11-09 16:00 ` Vladimir Sementsov-Ogievskiy
2022-11-11 16:54 ` Kevin Wolf
2022-11-08 12:37 ` [PATCH 07/13] block: Don't use subtree drains in bdrv_drop_intermediate() Kevin Wolf
2022-11-09 16:18 ` Vladimir Sementsov-Ogievskiy
2022-11-14 18:20 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 08/13] stream: Replace subtree drain with a single node drain Kevin Wolf
2022-11-09 16:52 ` Vladimir Sementsov-Ogievskiy
2022-11-10 10:16 ` Kevin Wolf
2022-11-10 11:25 ` Vladimir Sementsov-Ogievskiy
2022-11-10 17:27 ` Kevin Wolf
2022-11-14 18:21 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 09/13] block: Remove subtree drains Kevin Wolf
2022-11-09 17:22 ` Vladimir Sementsov-Ogievskiy
2022-11-14 18:22 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 10/13] block: Call drain callbacks only once Kevin Wolf
2022-11-09 18:05 ` Vladimir Sementsov-Ogievskiy
2022-11-14 12:32 ` Kevin Wolf
2022-11-09 18:54 ` Vladimir Sementsov-Ogievskiy
2022-11-14 18:23 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 11/13] block: Remove ignore_bds_parents parameter from drain functions Kevin Wolf
2022-11-09 18:57 ` Vladimir Sementsov-Ogievskiy
2022-11-14 18:23 ` Hanna Reitz
2022-11-08 12:37 ` [PATCH 12/13] block: Don't poll in bdrv_replace_child_noperm() Kevin Wolf
2022-11-11 11:21 ` Emanuele Giuseppe Esposito
2022-11-14 20:22 ` Hanna Reitz
2022-11-17 13:27 ` Kevin Wolf
2022-11-08 12:37 ` Kevin Wolf [this message]
2022-11-14 20:24 ` [PATCH 13/13] block: Remove poll parameter from bdrv_parent_drained_begin_single() Hanna Reitz
2022-11-10 20:13 ` [PATCH 00/13] block: Simplify drain Stefan Hajnoczi
2022-11-11 11:23 ` Emanuele Giuseppe Esposito
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=20221108123738.530873-14-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=eesposit@redhat.com \
--cc=hreitz@redhat.com \
--cc=pbonzini@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).