53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
|
From 9a914ea26d69de42b55e70c6d330eeec0cb7ccfe Mon Sep 17 00:00:00 2001
|
||
|
From: Paolo Bonzini <pbonzini@redhat.com>
|
||
|
Date: Fri, 22 Feb 2013 17:36:08 +0100
|
||
|
Subject: [PATCH 206/246] 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>
|
||
|
---
|
||
|
migration.c | 6 +-----
|
||
|
1 file changed, 1 insertion(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/migration.c b/migration.c
|
||
|
index 71c0eec..d601641 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();
|
||
|
--
|
||
|
1.8.2.1
|
||
|
|