[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 09/10] migration: Allow RECOVER->PAUSED convertion for dest qe
|
From: |
Peter Xu |
|
Subject: |
[PATCH v3 09/10] migration: Allow RECOVER->PAUSED convertion for dest qemu |
|
Date: |
Wed, 4 Oct 2023 18:02:39 -0400 |
There's a bug on dest that if a double fault triggered on dest qemu (a
network issue during postcopy-recover), we won't set PAUSED correctly
because we assumed we always came from ACTIVE.
Fix that by always overwriting the state to PAUSE.
We could also check for these two states, but maybe it's an overkill. We
did the same on the src QEMU to unconditionally switch to PAUSE anyway.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/savevm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 60eec7c31f..497ce02bd7 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2734,7 +2734,8 @@ static bool
postcopy_pause_incoming(MigrationIncomingState *mis)
qemu_mutex_unlock(&mis->postcopy_prio_thread_mutex);
}
- migrate_set_state(&mis->state, MIGRATION_STATUS_POSTCOPY_ACTIVE,
+ /* Current state can be either ACTIVE or RECOVER */
+ migrate_set_state(&mis->state, mis->state,
MIGRATION_STATUS_POSTCOPY_PAUSED);
/* Notify the fault thread for the invalidated file handle */
--
2.41.0
- Re: [PATCH v3 04/10] migration: Deliver return path file error to migrate state too, (continued)
- [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/04
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/05
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Fabiano Rosas, 2023/10/09
- Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/10
[PATCH v3 09/10] migration: Allow RECOVER->PAUSED convertion for dest qemu,
Peter Xu <=
[PATCH v3 01/10] migration: Display error in query-migrate irrelevant of status, Peter Xu, 2023/10/04