[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/65] migration: Allow RECOVER->PAUSED convertion for dest qemu
From: |
Juan Quintela |
Subject: |
[PULL 07/65] migration: Allow RECOVER->PAUSED convertion for dest qemu |
Date: |
Wed, 11 Oct 2023 11:21:05 +0200 |
From: Peter Xu <peterx@redhat.com>
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>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231004220240.167175-10-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
- [PULL 00/65] Migration 20231011 patches, Juan Quintela, 2023/10/11
- [PULL 01/65] migration/qmp: Fix crash on setting tls-authz with null, Juan Quintela, 2023/10/11
- [PULL 04/65] tests/qtest: migration: Use migrate_incoming_qmp where appropriate, Juan Quintela, 2023/10/11
- [PULL 07/65] migration: Allow RECOVER->PAUSED convertion for dest qemu,
Juan Quintela <=
- [PULL 03/65] tests/qtest: migration: Add migrate_incoming_qmp helper, Juan Quintela, 2023/10/11
- [PULL 06/65] tests/qtest: migration: Add support for negative testing of qmp_migrate, Juan Quintela, 2023/10/11
- [PULL 02/65] tests/qtest: migration: Expose migrate_set_capability, Juan Quintela, 2023/10/11
- [PULL 09/65] migration/rdma: Clean up qemu_rdma_data_init()'s return type, Juan Quintela, 2023/10/11
- [PULL 10/65] migration/rdma: Clean up rdma_delete_block()'s return type, Juan Quintela, 2023/10/11
- [PULL 05/65] migration: Set migration status early in incoming side, Juan Quintela, 2023/10/11
- [PULL 08/65] migration/rdma: Clean up qemu_rdma_poll()'s return type, Juan Quintela, 2023/10/11