migration: Minor control flow simplification
PATCH 1/1 migration: Minor control flow simplification
No need to declare a temporary variable.
Suggested-by Juan Quintela <[email protected]>
Fixes 1df36e8c6289 ("migration: Handle block device inactivation failures better")
Signed-off-by Eric Blake <[email protected]>
---
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(-)
migration/migration.c +2 -3
@@ -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 ();
base-commit: cdf07846e6fe07a2e20c93eed5902114dc1d3dcf
Signature · 1 line
2.40.0
Quoted 6 lines · Eric Blake
No need to declare a temporary variable.
Suggested-by Juan Quintela <[email protected]>Fixes 1df36e8c6289 ("migration: Handle block device inactivation failures better")Signed-off-by Eric Blake <[email protected]>---
Reviewed-by Juan Quintela <[email protected]>
Queued one way or another.