Skip to contentSkip to conversation

migration/migration.c: Add COLO dependency checks

PATCH In review Zhang Chen 4 participants 4 messages Nov 14, 2018 – Nov 21, 2018

lore
Share & tools
lore

Zhang Chen

author
#0 lore raw

PATCH 1/1 migration/migration.c: Add COLO dependency checks

From: Zhang Chen <[email protected]>

Current COLO mode(independent disk mode) need replication module work together. Suggested by Dr. David Alan Gilbert <[email protected]>.

---
 migration/migration.c | 9 +++++++++
 1 file changed, 9 insertions(+)
migration/migration.c +9 -0
index b261c1e4ce..49ffb9997a 100644
@@ -918,6 +918,15 @@ static bool migrate_caps_check(bool *cap_list,
     }
 #endif
 
+#ifndef CONFIG_REPLICATION
+    if (cap_list[MIGRATION_CAPABILITY_X_COLO]) {
+        error_setg(errp, "QEMU compiled without replication module"
+                   " can't enable COLO");
+        error_append_hint(errp, "Please enable replication before COLO.\n");
+        return false;
+    }
+#endif
+
     if (cap_list[MIGRATION_CAPABILITY_POSTCOPY_RAM]) {
         if (cap_list[MIGRATION_CAPABILITY_COMPRESS]) {
             /* The decompression threads asynchronously write into RAM
Signature · 1 line
2.17.GIT
#3 lore raw
In reply to Zhang Chen
Quoted 6 lines · * Zhang Chen ([email protected]) wrote:

From: Zhang Chen <[email protected]>

Current COLO mode(independent disk mode) need replication module work together. Suggested by Dr. David Alan Gilbert <[email protected]>.

Queued

Quoted 28 lines
---
 migration/migration.c | 9 +++++++++
 1 file changed, 9 insertions(+)
migration/migration.c +9 -0
index b261c1e4ce..49ffb9997a 100644
@@ -918,6 +918,15 @@ static bool migrate_caps_check(bool *cap_list,
     }
 #endif
 
+#ifndef CONFIG_REPLICATION
+    if (cap_list[MIGRATION_CAPABILITY_X_COLO]) {
+        error_setg(errp, "QEMU compiled without replication module"
+                   " can't enable COLO");
+        error_append_hint(errp, "Please enable replication before COLO.\n");
+        return false;
+    }
+#endif
+
     if (cap_list[MIGRATION_CAPABILITY_POSTCOPY_RAM]) {
         if (cap_list[MIGRATION_CAPABILITY_COMPRESS]) {
             /* The decompression threads asynchronously write into RAM
Signature · 1 line
2.17.GIT

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK