Skip to contentSkip to conversation

migration/postcopy: cleanup multifd after postcopy finish

PATCH New Wei Yang 1 participant 1 message Jul 24, 2019

lore
Share & tools
lore

Wei Yang

author
#0 lore raw

PATCH 1/1 migration/postcopy: cleanup multifd after postcopy finish

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

---
 migration/savevm.c | 4 ++++
 1 file changed, 4 insertions(+)
migration/savevm.c +4 -0
index 0105068579..27eef72c9d 100644
@@ -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);
Signature · 1 line
2.17.1