]> Git Repo - qemu.git/commitdiff
Remove migrate_set_block_enabled in checkpoint
authorRao, Lei <[email protected]>
Tue, 8 Jun 2021 08:23:28 +0000 (16:23 +0800)
committerJason Wang <[email protected]>
Fri, 11 Jun 2021 02:30:13 +0000 (10:30 +0800)
We can detect disk migration in migrate_prepare, if disk migration
is enabled in COLO mode, we can directly report an error.and there
is no need to disable block migration at every checkpoint.

Signed-off-by: Lei Rao <[email protected]>
Signed-off-by: Zhang Chen <[email protected]>
Reviewed-by: Li Zhijian <[email protected]>
Reviewed-by: Zhang Chen <[email protected]>
Reviewed-by: Lukas Straub <[email protected]>
Tested-by: Lukas Straub <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
migration/colo.c
migration/migration.c

index e498fdb125d87f8d4b8ee20fb132fd1c2b8f4c05..79fa1f66194beaae528c1605a1dca93ecd7e7c7d 100644 (file)
@@ -435,12 +435,6 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
     if (failover_get_state() != FAILOVER_STATUS_NONE) {
         goto out;
     }
-
-    /* Disable block migration */
-    migrate_set_block_enabled(false, &local_err);
-    if (local_err) {
-        goto out;
-    }
     qemu_mutex_lock_iothread();
 
 #ifdef CONFIG_REPLICATION
index 393299e150677ad8d306286dae5ff4dfaf442a2e..4828997f63dc88d27cc994c5ad21277d36653c2d 100644 (file)
@@ -2217,6 +2217,10 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
     }
 
     if (blk || blk_inc) {
+        if (migrate_colo_enabled()) {
+            error_setg(errp, "No disk migration is required in COLO mode");
+            return false;
+        }
         if (migrate_use_block() || migrate_use_block_incremental()) {
             error_setg(errp, "Command options are incompatible with "
                        "current migration capabilities");
This page took 0.032794 seconds and 4 git commands to generate.