summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-07-06 09:32:09 -0400
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-10 13:44:30 -0500
commit0884657b2e39f2cf85dfa99361817fde07e83786 (patch)
treef0209a7fdd0871f196c24ddbc00a2628c6f776c9 /migration.c
parentd9db889faf1bea70d36e31231bf324ae009c6344 (diff)
flush pending aio requests
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>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration.c b/migration.c
index e6c8b16a1f..ee64d410e1 100644
--- a/migration.c
+++ b/migration.c
@@ -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) {