|
|
357786 |
From 6ba43fc7c323ae3f0ee66262db96e22c261c1bbe Mon Sep 17 00:00:00 2001
|
|
|
357786 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
357786 |
Date: Fri, 14 Sep 2018 10:55:01 +0200
|
|
|
357786 |
Subject: [PATCH 10/49] block: Remove 'recursive' parameter from
|
|
|
357786 |
bdrv_drain_invoke()
|
|
|
357786 |
|
|
|
357786 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
357786 |
Message-id: <20180914105540.18077-4-kwolf@redhat.com>
|
|
|
357786 |
Patchwork-id: 82155
|
|
|
357786 |
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH 03/42] block: Remove 'recursive' parameter from bdrv_drain_invoke()
|
|
|
357786 |
Bugzilla: 1601212
|
|
|
357786 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
357786 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
357786 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
357786 |
|
|
|
357786 |
All callers pass false for the 'recursive' parameter now. Remove it.
|
|
|
357786 |
|
|
|
357786 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
357786 |
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
357786 |
(cherry picked from commit 7d40d9ef9dfb4948a857bfc6ec8408eed1d1d9e7)
|
|
|
357786 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
357786 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
357786 |
---
|
|
|
357786 |
block/io.c | 13 +++----------
|
|
|
357786 |
1 file changed, 3 insertions(+), 10 deletions(-)
|
|
|
357786 |
|
|
|
357786 |
diff --git a/block/io.c b/block/io.c
|
|
|
357786 |
index 230b551..aa41f1e 100644
|
|
|
357786 |
--- a/block/io.c
|
|
|
357786 |
+++ b/block/io.c
|
|
|
357786 |
@@ -167,9 +167,8 @@ static void coroutine_fn bdrv_drain_invoke_entry(void *opaque)
|
|
|
357786 |
}
|
|
|
357786 |
|
|
|
357786 |
/* Recursively call BlockDriver.bdrv_co_drain_begin/end callbacks */
|
|
|
357786 |
-static void bdrv_drain_invoke(BlockDriverState *bs, bool begin, bool recursive)
|
|
|
357786 |
+static void bdrv_drain_invoke(BlockDriverState *bs, bool begin)
|
|
|
357786 |
{
|
|
|
357786 |
- BdrvChild *child, *tmp;
|
|
|
357786 |
BdrvCoDrainData data = { .bs = bs, .done = false, .begin = begin};
|
|
|
357786 |
|
|
|
357786 |
if (!bs->drv || (begin && !bs->drv->bdrv_co_drain_begin) ||
|
|
|
357786 |
@@ -180,12 +179,6 @@ static void bdrv_drain_invoke(BlockDriverState *bs, bool begin, bool recursive)
|
|
|
357786 |
data.co = qemu_coroutine_create(bdrv_drain_invoke_entry, &data);
|
|
|
357786 |
bdrv_coroutine_enter(bs, data.co);
|
|
|
357786 |
BDRV_POLL_WHILE(bs, !data.done);
|
|
|
357786 |
-
|
|
|
357786 |
- if (recursive) {
|
|
|
357786 |
- QLIST_FOREACH_SAFE(child, &bs->children, next, tmp) {
|
|
|
357786 |
- bdrv_drain_invoke(child->bs, begin, true);
|
|
|
357786 |
- }
|
|
|
357786 |
- }
|
|
|
357786 |
}
|
|
|
357786 |
|
|
|
357786 |
static bool bdrv_drain_recurse(BlockDriverState *bs)
|
|
|
357786 |
@@ -286,7 +279,7 @@ void bdrv_do_drained_begin(BlockDriverState *bs, bool recursive,
|
|
|
357786 |
}
|
|
|
357786 |
|
|
|
357786 |
bdrv_parent_drained_begin(bs, parent);
|
|
|
357786 |
- bdrv_drain_invoke(bs, true, false);
|
|
|
357786 |
+ bdrv_drain_invoke(bs, true);
|
|
|
357786 |
bdrv_drain_recurse(bs);
|
|
|
357786 |
|
|
|
357786 |
if (recursive) {
|
|
|
357786 |
@@ -321,7 +314,7 @@ void bdrv_do_drained_end(BlockDriverState *bs, bool recursive,
|
|
|
357786 |
old_quiesce_counter = atomic_fetch_dec(&bs->quiesce_counter);
|
|
|
357786 |
|
|
|
357786 |
/* Re-enable things in child-to-parent order */
|
|
|
357786 |
- bdrv_drain_invoke(bs, false, false);
|
|
|
357786 |
+ bdrv_drain_invoke(bs, false);
|
|
|
357786 |
bdrv_parent_drained_end(bs, parent);
|
|
|
357786 |
if (old_quiesce_counter == 1) {
|
|
|
357786 |
aio_enable_external(bdrv_get_aio_context(bs));
|
|
|
357786 |
--
|
|
|
357786 |
1.8.3.1
|
|
|
357786 |
|