@@ -3432,7 +3432,6 @@ static void migration_completion(MigrationState *s)
ret = global_state_store();
if (!ret) {
- bool inactivate = !migrate_colo_enabled();
ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
trace_migration_completion_vm_stop(ret);
if (ret >= 0) {
@@ -3440,10 +3439,10 @@ static void migration_completion(MigrationState *s)
MIGRATION_STATUS_DEVICE);
}
if (ret >= 0) {
- s->block_inactive = inactivate;
+ s->block_inactive = !migrate_colo_enabled();
qemu_file_set_rate_limit(s->to_dst_file, INT64_MAX);
ret = qemu_savevm_state_complete_precopy(s->to_dst_file, false,
- inactivate);
+ s->block_inactive);
}
}
qemu_mutex_unlock_iothread();
No need to declare a temporary variable. Suggested-by: Juan Quintela <quintela@redhat.com> Fixes: 1df36e8c6289 ("migration: Handle block device inactivation failures better") Signed-off-by: Eric Blake <eblake@redhat.com> --- If Juan's pull request https://lists.gnu.org/archive/html/qemu-devel/2023-04/msg03138.html needs a v2, then this can be squashed as a fixup to 15/20 of that request; otherwise, this can go on top whenever convenient. migration/migration.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) base-commit: cdf07846e6fe07a2e20c93eed5902114dc1d3dcf