[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/42] migration: always use vm_stop_force_state
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 02/42] migration: always use vm_stop_force_state |
Date: |
Fri, 22 Feb 2013 17:36:08 +0100 |
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 <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
migration.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/migration.c b/migration.c
index ba8b647..65e8583 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.1.2
- [Qemu-devel] [PATCH v2 00/42] Migration cleanups and latency improvements, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 01/42] migration: simplify while loop, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 04/42] migration: push qemu_savevm_state_cancel out of qemu_savevm_state_*, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 05/42] block-migration: remove useless calls to blk_mig_cleanup, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 02/42] migration: always use vm_stop_force_state,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 06/42] qemu-file: pass errno from qemu_fflush via f->last_error, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 08/42] qemu-file: temporarily expose qemu_file_set_error and qemu_fflush, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 03/42] migration: move more error handling to migrate_fd_cleanup, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 11/42] migration: simplify error handling, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 09/42] migration: flush all data to fd when buffered_flush is called, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 16/42] block-migration: remove variables that are never read, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 13/42] migration: add migrate_set_state tracepoint, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 12/42] migration: do not nest flushing of device data, Paolo Bonzini, 2013/02/22
- [Qemu-devel] [PATCH 14/42] migration: prepare to access s->state outside critical sections, Paolo Bonzini, 2013/02/22