From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNoIu-0008E6-P8 for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:32:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNoIp-00082k-Cf for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:32:19 -0400 Received: from [199.232.76.173] (port=59535 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNoIp-00081y-4c for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:32:15 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59420) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNoIm-0004M5-Uu for qemu-devel@nongnu.org; Mon, 06 Jul 2009 09:32:13 -0400 From: Glauber Costa Date: Mon, 6 Jul 2009 09:32:09 -0400 Message-Id: <1246887129-10543-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH] flush pending aio requests List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com 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 --- migration.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 190b37e..72c6cbf 100644 --- a/migration.c +++ b/migration.c @@ -264,6 +264,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) { vm_start(); -- 1.6.2.2