]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
flush pending aio requests
authorGlauber Costa <glommer@redhat.com>
Mon, 6 Jul 2009 13:32:09 +0000 (09:32 -0400)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 10 Jul 2009 22:26:09 +0000 (17:26 -0500)
When we finish migration, there may be pending async io requests
in flight. If we don't flush it before stage3 starting, it might be
the case that the guest loses it.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
migration.c

index 61c92fe5ff8137d891aaf3b880b1953bfc6fae98..86ebbf0a2cdf1557e04e6917c2a66e6ce3f44a24 100644 (file)
@@ -218,6 +218,7 @@ void migrate_fd_put_ready(void *opaque)
         dprintf("done iterating\n");
         vm_stop(0);
 
+        qemu_aio_flush();
         bdrv_flush_all();
         if ((qemu_savevm_state_complete(s->file)) < 0) {
             if (old_vm_running) {