* [PATCH] migration: Minor control flow simplification
@ 2023-04-20 14:35 Eric Blake
2023-04-20 20:50 ` Juan Quintela
0 siblings, 1 reply; 2+ messages in thread
From: Eric Blake @ 2023-04-20 14:35 UTC (permalink / raw)
To: qemu-devel; +Cc: Juan Quintela
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(-)
diff --git a/migration/migration.c b/migration/migration.c
index 7b0d4a9d8f2..59b6bcac958 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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
--
2.40.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] migration: Minor control flow simplification
2023-04-20 14:35 [PATCH] migration: Minor control flow simplification Eric Blake
@ 2023-04-20 20:50 ` Juan Quintela
0 siblings, 0 replies; 2+ messages in thread
From: Juan Quintela @ 2023-04-20 20:50 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel
Eric Blake <eblake@redhat.com> wrote:
> 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>
> ---
Reviewed-by: Juan Quintela <quintela@redhat.com>
Queued one way or another.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-20 20:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20 14:35 [PATCH] migration: Minor control flow simplification Eric Blake
2023-04-20 20:50 ` Juan Quintela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).