From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THeoU-0002dQ-NR for qemu-devel@nongnu.org; Fri, 28 Sep 2012 13:57:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THeoR-0007Lu-Tg for qemu-devel@nongnu.org; Fri, 28 Sep 2012 13:57:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THeoR-0007LX-LG for qemu-devel@nongnu.org; Fri, 28 Sep 2012 13:57:19 -0400 From: Kevin Wolf Date: Fri, 28 Sep 2012 19:56:44 +0200 Message-Id: <1348855033-17174-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1348855033-17174-1-git-send-email-kwolf@redhat.com> References: <1348855033-17174-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 01/30] block-migration: Flush requests in blk_mig_cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org When cancelling block migration, all in-flight requests of the block migration must be completed before the data can be freed. This was visible as failing assertions and segfaults. Reported-by: Peter Lieven Signed-off-by: Kevin Wolf --- block-migration.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block-migration.c b/block-migration.c index 7def8ab..ed93301 100644 --- a/block-migration.c +++ b/block-migration.c @@ -519,6 +519,8 @@ static void blk_mig_cleanup(void) BlkMigDevState *bmds; BlkMigBlock *blk; + bdrv_drain_all(); + set_dirty_tracking(0); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { -- 1.7.6.5