qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] migration: Fix transition to COLO state from precopy
@ 2025-11-04  1:36 Li Zhijian via
  2025-11-04  1:49 ` Zhijian Li (Fujitsu)
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Li Zhijian via @ 2025-11-04  1:36 UTC (permalink / raw)
  To: peterx, farosas; +Cc: zhangckid, zhanghailiang, qemu-devel, Li Zhijian

Commit 4881411136 ("migration: Always set DEVICE state") set a new DEVICE
state before completed during migration, which broke the original transition
to COLO. The migration flow for precopy has changed to:
active -> pre-switchover -> device -> completed.

This patch updates the transition state to ensure that the Pre-COLO
state corresponds to DEVICE state correctly.

Fixes: 4881411136 ("migration: Always set DEVICE state")
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
 migration/migration.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/migration/migration.c b/migration/migration.c
index a63b46bbef..6ec7f3cec8 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3095,9 +3095,9 @@ static void migration_completion(MigrationState *s)
         goto fail;
     }
 
-    if (migrate_colo() && s->state == MIGRATION_STATUS_ACTIVE) {
+    if (migrate_colo() && s->state == MIGRATION_STATUS_DEVICE) {
         /* COLO does not support postcopy */
-        migrate_set_state(&s->state, MIGRATION_STATUS_ACTIVE,
+        migrate_set_state(&s->state, MIGRATION_STATUS_DEVICE,
                           MIGRATION_STATUS_COLO);
     } else {
         migration_completion_end(s);
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-06 22:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04  1:36 [PATCH] migration: Fix transition to COLO state from precopy Li Zhijian via
2025-11-04  1:49 ` Zhijian Li (Fujitsu)
2025-11-04  2:40 ` Zhang Chen
2025-11-05 20:58 ` Peter Xu
2025-11-06  1:09   ` Zhijian Li (Fujitsu)
2025-11-06  3:21     ` Zhang Chen
2025-11-06  3:24       ` Zhang Chen
2025-11-06 22:07       ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).