Commit 0884657b2e39f2cf85dfa99361817fde07e83786
Committed by
Anthony Liguori
1 parent
d9db889f
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>
Showing
1 changed file
with
1 additions
and
0 deletions
migration.c
@@ -266,6 +266,7 @@ void migrate_fd_put_ready(void *opaque) | @@ -266,6 +266,7 @@ void migrate_fd_put_ready(void *opaque) | ||
266 | dprintf("done iterating\n"); | 266 | dprintf("done iterating\n"); |
267 | vm_stop(0); | 267 | vm_stop(0); |
268 | 268 | ||
269 | + qemu_aio_flush(); | ||
269 | bdrv_flush_all(); | 270 | bdrv_flush_all(); |
270 | if ((qemu_savevm_state_complete(s->file)) < 0) { | 271 | if ((qemu_savevm_state_complete(s->file)) < 0) { |
271 | if (old_vm_running) { | 272 | if (old_vm_running) { |