[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/35] block: Remove 'recursive' parameter from bdrv_
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 03/35] block: Remove 'recursive' parameter from bdrv_drain_invoke() |
Date: |
Mon, 18 Jun 2018 18:44:32 +0200 |
All callers pass false for the 'recursive' parameter now. Remove it.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
block/io.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/block/io.c b/block/io.c
index b355009f2c..b75d68886a 100644
--- a/block/io.c
+++ b/block/io.c
@@ -168,9 +168,8 @@ static void coroutine_fn bdrv_drain_invoke_entry(void
*opaque)
}
/* Recursively call BlockDriver.bdrv_co_drain_begin/end callbacks */
-static void bdrv_drain_invoke(BlockDriverState *bs, bool begin, bool recursive)
+static void bdrv_drain_invoke(BlockDriverState *bs, bool begin)
{
- BdrvChild *child, *tmp;
BdrvCoDrainData data = { .bs = bs, .done = false, .begin = begin};
if (!bs->drv || (begin && !bs->drv->bdrv_co_drain_begin) ||
@@ -181,12 +180,6 @@ static void bdrv_drain_invoke(BlockDriverState *bs, bool
begin, bool recursive)
data.co = qemu_coroutine_create(bdrv_drain_invoke_entry, &data);
bdrv_coroutine_enter(bs, data.co);
BDRV_POLL_WHILE(bs, !data.done);
-
- if (recursive) {
- QLIST_FOREACH_SAFE(child, &bs->children, next, tmp) {
- bdrv_drain_invoke(child->bs, begin, true);
- }
- }
}
static bool bdrv_drain_recurse(BlockDriverState *bs)
@@ -287,7 +280,7 @@ void bdrv_do_drained_begin(BlockDriverState *bs, bool
recursive,
}
bdrv_parent_drained_begin(bs, parent);
- bdrv_drain_invoke(bs, true, false);
+ bdrv_drain_invoke(bs, true);
bdrv_drain_recurse(bs);
if (recursive) {
@@ -322,7 +315,7 @@ void bdrv_do_drained_end(BlockDriverState *bs, bool
recursive,
old_quiesce_counter = atomic_fetch_dec(&bs->quiesce_counter);
/* Re-enable things in child-to-parent order */
- bdrv_drain_invoke(bs, false, false);
+ bdrv_drain_invoke(bs, false);
bdrv_parent_drained_end(bs, parent);
if (old_quiesce_counter == 1) {
aio_enable_external(bdrv_get_aio_context(bs));
--
2.13.6
- [Qemu-devel] [PULL 00/35] Block layer patches, Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 03/35] block: Remove 'recursive' parameter from bdrv_drain_invoke(),
Kevin Wolf <=
- [Qemu-devel] [PULL 05/35] tests/test-bdrv-drain: bdrv_drain_all() works in coroutines now, Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 02/35] block: Use bdrv_do_drain_begin/end in bdrv_drain_all(), Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 04/35] block: Don't manually poll in bdrv_drain_all(), Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 06/35] block: Avoid unnecessary aio_poll() in AIO_WAIT_WHILE(), Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 07/35] block: Really pause block jobs on drain, Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 09/35] test-bdrv-drain: Add test for node deletion, Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 11/35] test-bdrv-drain: Test node deletion in subtree recursion, Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 01/35] test-bdrv-drain: bdrv_drain() works with cross-AioContext events, Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 12/35] block: Don't poll in parent drain callbacks, Kevin Wolf, 2018/06/18
- [Qemu-devel] [PULL 08/35] block: Remove bdrv_drain_recurse(), Kevin Wolf, 2018/06/18