summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-02-22 17:36:08 +0100
committerJuan Quintela <quintela@redhat.com>2013-03-11 13:32:00 +0100
commit891518abd804401978e402d588733e282be960ad (patch)
treecac03ba68bfef0e813d7977e3253d211e13cf4ec /migration.c
parent5da5aad068def65b5e278a6380192d4bfe279585 (diff)
downloadqemu-891518abd804401978e402d588733e282be960ad.tar.gz
migration: always use vm_stop_force_state
vm_stop_force_state does: if (runstate_is_running()) { vm_stop(state); } else { runstate_set(state); } migration.c does: if (runstate_is_running()) { vm_stop(state); } else { vm_stop_force_state(state); } The code run is the same even if we always use vm_stop_force_state in migration.c. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/migration.c b/migration.c
index ba8b647dce..65e8583517 100644
--- a/migration.c
+++ b/migration.c
@@ -699,11 +699,7 @@ static void *buffered_file_thread(void *opaque)
DPRINTF("done iterating\n");
start_time = qemu_get_clock_ms(rt_clock);
qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
- if (old_vm_running) {
- vm_stop(RUN_STATE_FINISH_MIGRATE);
- } else {
- vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
- }
+ vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
ret = qemu_savevm_state_complete(s->file);
if (ret < 0) {
qemu_mutex_unlock_iothread();