修订版 | eeeb48ee3389e837428370a8ed2772c2e74cce49 (tree) |
---|---|
时间 | 2022-01-28 23:38:23 |
作者 | Zhang Chen <chen.zhang@inte...> |
Commiter | Juan Quintela |
migration/migration.c: Avoid COLO boot in postcopy migration
COLO dose not support postcopy migration and remove the Fixme.
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
@@ -3230,7 +3230,11 @@ static void migration_completion(MigrationState *s) | ||
3230 | 3230 | goto fail_invalidate; |
3231 | 3231 | } |
3232 | 3232 | |
3233 | - if (!migrate_colo_enabled()) { | |
3233 | + if (migrate_colo_enabled() && s->state == MIGRATION_STATUS_ACTIVE) { | |
3234 | + /* COLO does not support postcopy */ | |
3235 | + migrate_set_state(&s->state, MIGRATION_STATUS_ACTIVE, | |
3236 | + MIGRATION_STATUS_COLO); | |
3237 | + } else { | |
3234 | 3238 | migrate_set_state(&s->state, current_active_state, |
3235 | 3239 | MIGRATION_STATUS_COMPLETED); |
3236 | 3240 | } |
@@ -3621,10 +3625,6 @@ static void migration_iteration_finish(MigrationState *s) | ||
3621 | 3625 | "COLO enabled", __func__); |
3622 | 3626 | } |
3623 | 3627 | migrate_start_colo_process(s); |
3624 | - /* | |
3625 | - * Fixme: we will run VM in COLO no matter its old running state. | |
3626 | - * After exited COLO, we will keep running. | |
3627 | - */ | |
3628 | 3628 | /* Fallthrough */ |
3629 | 3629 | case MIGRATION_STATUS_ACTIVE: |
3630 | 3630 | /* |