qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] migration/postcopy: cleanup multifd after postcopy


From: Wei Yang
Subject: [Qemu-devel] [PATCH] migration/postcopy: cleanup multifd after postcopy finish
Date: Wed, 24 Jul 2019 09:32:08 +0800

In case we enable multifd, not forget to cleanup it.

Signed-off-by: Wei Yang <address@hidden>
---
 migration/savevm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/migration/savevm.c b/migration/savevm.c
index 0105068579..27eef72c9d 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1738,6 +1738,7 @@ static void *postcopy_ram_listen_thread(void *opaque)
 {
     MigrationIncomingState *mis = migration_incoming_get_current();
     QEMUFile *f = mis->from_src_file;
+    Error *local_err = NULL;
     int load_res;
 
     migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE,
@@ -1800,6 +1801,9 @@ static void *postcopy_ram_listen_thread(void *opaque)
      */
     migration_incoming_state_destroy();
     qemu_loadvm_state_cleanup();
+    if (multifd_load_cleanup(&local_err) != 0) {
+        error_report_err(local_err);
+    }
 
     rcu_unregister_thread();
     postcopy_state_set(POSTCOPY_INCOMING_END, NULL);
-- 
2.17.1




reply via email to

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