]> git.proxmox.com Git - 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 18:44:30 +0000 (13:44 -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 e6c8b16a1f77ed3c1b30c6018235a5f302f57f4e..ee64d410e16096a366a1507ab7dadf651e8d6e5e 100644 (file)
@@ -266,6 +266,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) {