qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] This patch is to solve the problem that the bitmap file in memor


From: Hongleilee
Subject: [PATCH] This patch is to solve the problem that the bitmap file in memory is lost after creating a snapshot
Date: Tue, 20 Sep 2022 10:47:06 +0800

From: Hongleili Li (李红磊)-云数据中心集团 <lihonglei03@inspur.com>

Signed-off-by: Hongleili Li (李红磊)-云数据中心集团 <lihonglei03@inspur.com>
---
 blockdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/blockdev.c b/blockdev.c
index 9230888e34..a6b85d06b7 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1534,6 +1534,10 @@ static void external_snapshot_prepare(BlkActionState 
*common,
 
     state->new_bs = bdrv_open(new_image_file, snapshot_ref, options, flags,
                               errp);
+
+    state->new_bs->dirty_bitmaps = state->old_bs->dirty_bitmaps;
+    QLIST_INIT(&state->old_bs->dirty_bitmaps);
+
     /* We will manually add the backing_hd field to the bs later */
     if (!state->new_bs) {
         goto out;
-- 
2.37.3.windows.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]