[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/51] block: Remove poll parameter from bdrv_parent_drained_begin
From: |
Kevin Wolf |
Subject: |
[PULL 19/51] block: Remove poll parameter from bdrv_parent_drained_begin_single() |
Date: |
Wed, 14 Dec 2022 14:44:21 +0100 |
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>
Message-Id: <20221118174110.55183-16-kwolf@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
include/block/block-io.h | 5 ++---
block.c | 4 ++--
block/io.c | 8 ++------
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/include/block/block-io.h b/include/block/block-io.h
index 65e6d2569b..92aaa7c1e9 100644
--- a/include/block/block-io.h
+++ b/include/block/block-io.h
@@ -287,10 +287,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 faaeca8472..97073092c4 100644
--- a/block.c
+++ b/block.c
@@ -2417,7 +2417,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->quiesced_parent);
@@ -3090,7 +3090,7 @@ static BdrvChild
*bdrv_attach_child_common(BlockDriverState *child_bs,
* a problem, we already did this), but it will still poll until the parent
* is fully quiesced, so it will not be negatively affected either.
*/
- 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 ae64830eac..38e57d1f67 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);
}
}
@@ -105,9 +105,8 @@ 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)
{
- AioContext *ctx = bdrv_child_get_parent_aio_context(c);
IO_OR_GS_CODE();
assert(!c->quiesced_parent);
@@ -116,9 +115,6 @@ void bdrv_parent_drained_begin_single(BdrvChild *c, bool
poll)
if (c->klass->drained_begin) {
c->klass->drained_begin(c);
}
- if (poll) {
- AIO_WAIT_WHILE(ctx, bdrv_parent_drained_poll_single(c));
- }
}
static void bdrv_merge_limits(BlockLimits *dst, const BlockLimits *src)
--
2.38.1
- [PULL 00/51] Block layer patches, Kevin Wolf, 2022/12/14
- [PULL 08/51] block: Remove drained_end_counter, Kevin Wolf, 2022/12/14
- [PULL 02/51] block: drop bdrv_remove_filter_or_cow_child, Kevin Wolf, 2022/12/14
- [PULL 05/51] qed: Don't yield in bdrv_qed_co_drain_begin(), Kevin Wolf, 2022/12/14
- [PULL 07/51] block: Revert .bdrv_drained_begin/end to non-coroutine_fn, Kevin Wolf, 2022/12/14
- [PULL 03/51] block: bdrv_refresh_perms(): allow external tran, Kevin Wolf, 2022/12/14
- [PULL 04/51] block: refactor bdrv_list_refresh_perms to allow any list of nodes, Kevin Wolf, 2022/12/14
- [PULL 12/51] block: Don't use subtree drains in bdrv_drop_intermediate(), Kevin Wolf, 2022/12/14
- [PULL 15/51] block: Call drain callbacks only once, Kevin Wolf, 2022/12/14
- [PULL 13/51] stream: Replace subtree drain with a single node drain, Kevin Wolf, 2022/12/14
- [PULL 19/51] block: Remove poll parameter from bdrv_parent_drained_begin_single(),
Kevin Wolf <=
- [PULL 01/51] block: Inline bdrv_detach_child(), Kevin Wolf, 2022/12/14
- [PULL 10/51] block: Fix locking for bdrv_reopen_queue_child(), Kevin Wolf, 2022/12/14
- [PULL 09/51] block: Inline bdrv_drain_invoke(), Kevin Wolf, 2022/12/14
- [PULL 14/51] block: Remove subtree drains, Kevin Wolf, 2022/12/14
- [PULL 06/51] test-bdrv-drain: Don't yield in .bdrv_co_drained_begin/end(), Kevin Wolf, 2022/12/14
- [PULL 20/51] block-io: introduce coroutine_fn duplicates for bdrv_common_block_status_above callers, Kevin Wolf, 2022/12/14
- [PULL 23/51] block-backend: replace bdrv_*_above with blk_*_above, Kevin Wolf, 2022/12/14
- [PULL 16/51] block: Remove ignore_bds_parents parameter from drain_begin/end., Kevin Wolf, 2022/12/14
- [PULL 11/51] block: Drain individual nodes during reopen, Kevin Wolf, 2022/12/14
- [PULL 22/51] nbd/server.c: add coroutine_fn annotations, Kevin Wolf, 2022/12/14