diff mbox series

回复: [PATCH 2/2] migration: allow enabling mutilfd for specific protocol only

Message ID OS3PR01MB76502CD55D5EEBC969594D53A5E19@OS3PR01MB7650.jpnprd01.prod.outlook.com (mailing list archive)
State New, archived
Headers show
Series 回复: [PATCH 2/2] migration: allow enabling mutilfd for specific protocol only | expand

Commit Message

Zhijian Li (Fujitsu) July 19, 2021, 3:21 a.m. UTC
there was a typo:  s/protocal/protocol
diff mbox series

Patch

diff --git a/migration/migration.c b/migration/migration.c
index d6d48f6999b..bcc8b3bcb92 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1249,6 +1249,14 @@  static bool migrate_caps_check(bool *cap_list,
         }
     }

+    /* incoming side only */
+    if (runstate_check(RUN_STATE_INMIGRATE) &&
+        !migrate_multifd_is_allowed() &&
+        cap_list[MIGRATION_CAPABILITY_MULTIFD]) {
+        error_setg(errp, "multifd is not supported by current protocol");
+        return false;
+    }
+
     return true;
 }

diff --git a/migration/multifd.c b/migration/multifd.c
index b3d99c79d83..372f3633eda 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -864,7 +864,7 @@  cleanup:
     multifd_new_send_channel_cleanup(p, sioc, local_err);
 }

-static bool migrate_allow_multifd;
+static bool migrate_allow_multifd = true;
 void migrate_protocal_allow_multifd(bool allow)
 {
     migrate_allow_multifd = allow;