|
|
7f1c5b |
From 6af6de77dace29aa8548b3649dc9c6163740ac86 Mon Sep 17 00:00:00 2001
|
|
|
7f1c5b |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
7f1c5b |
Date: Fri, 18 Nov 2022 18:41:03 +0100
|
|
|
7f1c5b |
Subject: [PATCH 21/31] block: Don't use subtree drains in
|
|
|
7f1c5b |
bdrv_drop_intermediate()
|
|
|
7f1c5b |
|
|
|
7f1c5b |
RH-Author: Stefano Garzarella <sgarzare@redhat.com>
|
|
|
7f1c5b |
RH-MergeRequest: 135: block: Simplify drain to prevent QEMU from crashing during snapshot
|
|
|
7f1c5b |
RH-Bugzilla: 2155112
|
|
|
7f1c5b |
RH-Acked-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
|
|
|
7f1c5b |
RH-Acked-by: Hanna Czenczek <hreitz@redhat.com>
|
|
|
7f1c5b |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
7f1c5b |
RH-Commit: [9/16] 3c06fa826f262558f57d38b0155500c2e8e23a53 (sgarzarella/qemu-kvm-c-9-s)
|
|
|
7f1c5b |
|
|
|
7f1c5b |
Instead of using a subtree drain from the top node (which also drains
|
|
|
7f1c5b |
child nodes of base that we're not even interested in), use a normal
|
|
|
7f1c5b |
drain for base, which automatically drains all of the parents, too.
|
|
|
7f1c5b |
|
|
|
7f1c5b |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
7f1c5b |
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
|
|
|
7f1c5b |
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
|
|
|
7f1c5b |
Message-Id: <20221118174110.55183-9-kwolf@redhat.com>
|
|
|
7f1c5b |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
7f1c5b |
(cherry picked from commit 631086deefc32690ee56efed1c5b891dec31ae37)
|
|
|
7f1c5b |
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
|
7f1c5b |
---
|
|
|
7f1c5b |
block.c | 4 ++--
|
|
|
7f1c5b |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
7f1c5b |
|
|
|
7f1c5b |
diff --git a/block.c b/block.c
|
|
|
7f1c5b |
index cb5e96b1cf..b3449a312e 100644
|
|
|
7f1c5b |
--- a/block.c
|
|
|
7f1c5b |
+++ b/block.c
|
|
|
7f1c5b |
@@ -5586,7 +5586,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
|
|
|
7f1c5b |
GLOBAL_STATE_CODE();
|
|
|
7f1c5b |
|
|
|
7f1c5b |
bdrv_ref(top);
|
|
|
7f1c5b |
- bdrv_subtree_drained_begin(top);
|
|
|
7f1c5b |
+ bdrv_drained_begin(base);
|
|
|
7f1c5b |
|
|
|
7f1c5b |
if (!top->drv || !base->drv) {
|
|
|
7f1c5b |
goto exit;
|
|
|
7f1c5b |
@@ -5659,7 +5659,7 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
|
|
|
7f1c5b |
|
|
|
7f1c5b |
ret = 0;
|
|
|
7f1c5b |
exit:
|
|
|
7f1c5b |
- bdrv_subtree_drained_end(top);
|
|
|
7f1c5b |
+ bdrv_drained_end(base);
|
|
|
7f1c5b |
bdrv_unref(top);
|
|
|
7f1c5b |
return ret;
|
|
|
7f1c5b |
}
|
|
|
7f1c5b |
--
|
|
|
7f1c5b |
2.31.1
|
|
|
7f1c5b |
|