From 55df6f33655ed4139c824aa3ab9a4ab0c19dca83 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Mon, 22 Nov 2010 19:52:22 +0200 Subject: cpus: flush all requests on each vm stop Flush all requests once we have stopped all cpus and devices. Make sure disk is in consistent state. Signed-off-by: Michael S. Tsirkin Tested-by: Jason Wang Acked-by: Marcelo Tosatti --- cpus.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cpus.c') diff --git a/cpus.c b/cpus.c index 91a0fb114..0309189bf 100644 --- a/cpus.c +++ b/cpus.c @@ -111,6 +111,8 @@ static void do_vm_stop(int reason) vm_running = 0; pause_all_vcpus(); vm_state_notify(0, reason); + qemu_aio_flush(); + bdrv_flush_all(); monitor_protocol_event(QEVENT_STOP, NULL); } } -- cgit v1.2.3