Make sure disk is in consistent state.

Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
Tested-by: Jason Wang <jasow...@redhat.com>
---
 cpus.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cpus.c b/cpus.c
index 91a0fb1..d421a96 100644
--- a/cpus.c
+++ b/cpus.c
@@ -110,6 +110,8 @@ static void do_vm_stop(int reason)
         cpu_disable_ticks();
         vm_running = 0;
         pause_all_vcpus();
+        qemu_aio_flush();
+        bdrv_flush_all();
         vm_state_notify(0, reason);
         monitor_protocol_event(QEVENT_STOP, NULL);
     }
-- 
1.7.3.2.91.g446ac


Reply via email to