[pve-devel] [PATCH 24/31] PVE: move snapshot cleanup into bottom half

Dietmar Maurer dietmar at proxmox.com
Fri Mar 6 12:30:04 CET 2020


From: Wolfgang Bumiller <w.bumiller at proxmox.com>

as per:
    (0ceccd858a8d) migration: qemu_savevm_state_cleanup() in cleanup

may affect held locks and therefore change assumptions made
by that function!

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 savevm-async.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/savevm-async.c b/savevm-async.c
index e4bb0d24b2..10837fc858 100644
--- a/savevm-async.c
+++ b/savevm-async.c
@@ -200,6 +200,8 @@ static void process_savevm_cleanup(void *opaque)
     int ret;
     qemu_bh_delete(snap_state.cleanup_bh);
     snap_state.cleanup_bh = NULL;
+    qemu_savevm_state_cleanup();
+
     qemu_mutex_unlock_iothread();
     qemu_thread_join(&snap_state.thread);
     qemu_mutex_lock_iothread();
@@ -276,7 +278,6 @@ static void *process_savevm_thread(void *opaque)
                     save_snapshot_error("qemu_savevm_state_iterate error %d", ret);
                     break;
             }
-            qemu_savevm_state_cleanup();
             DPRINTF("save complete\n");
             break;
         }
-- 
2.20.1




More information about the pve-devel mailing list