]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
migration/migration.c: Add COLO dependency checks
authorZhang Chen <chen.zhang@intel.com>
Wed, 14 Nov 2018 19:09:12 +0000 (03:09 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 21 Nov 2018 11:38:12 +0000 (11:38 +0000)
Current COLO mode(independent disk mode) need replication module work
together. Suggested by Dr. David Alan Gilbert <dgilbert@redhat.com>.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20181114190912.7242-1-chen.zhang@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.c

index b261c1e4ce80267f7f4154768a0e6433d6c70574..49ffb9997a3de3d67be6cb07071e4387726d95ca 100644 (file)
@@ -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