From patchwork Tue Jun 19 01:42:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 931286 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="V54XbHLW"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 418sMy3XNVz9s37 for ; Tue, 19 Jun 2018 12:28:46 +1000 (AEST) Received: from localhost ([::1]:38628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV6Nw-0000tU-4S for incoming@patchwork.ozlabs.org; Mon, 18 Jun 2018 22:28:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5hy-0001a9-Bv for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:45:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5hx-0008Og-D5 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:45:22 -0400 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:41477) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5hx-0008Oa-83; Mon, 18 Jun 2018 21:45:21 -0400 Received: by mail-oi0-x22e.google.com with SMTP id a141-v6so16693569oii.8; Mon, 18 Jun 2018 18:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=N74TcslkdOeXZjJ035p8Cr7MeldxPXEGVyCegfyI7JE=; b=V54XbHLWPVYahT0z0RfpkLY5+ZN3EOKyG6VxGOPweD8LTkoTH7m47yvHWSCtq4Vrsf IyJVzbVNtf3LiWBNyf6RnjV/mvoUh5cM7BHt+viaN1Rzv5Fmy+BN+BxkyjWxCtgjLwu8 NPg7Aoh/UtlC9ahn4NgE8lXLHnQnskvDYqIQmR80MuglK2m1oD45pxX/Unen2jdo3Exd h0fsQVh/SlJ+9fOHXBFjcEqOzqKp+Tw7OwenmeBT1z2D38tgCYqmmBE8Mfmgg0m6sQAa Qj4DekX5WlCFpns5C9wQSmUkeqGI7Q9pZOHUU4ZKmrJlSD97EAxAcrdNsy5CrOWtRurl 4Xag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=N74TcslkdOeXZjJ035p8Cr7MeldxPXEGVyCegfyI7JE=; b=oqr/Ihhroy35OxYwP/371I9CJWnSULETpjQyJDV04Q/zv5HpunKirDgOi7lS0VXl7z BCIqSZ4Zj4BIz36ctFpscY1msvq5O1qUi9CRFuhhJvt58BxAM7S6V17FkQz/A3ZQYoaB kelGB4PMZDR6wh3ttZi+hNTZuTLiC8Z86ZId2MlffnUnWExGULGSTXzUhkDMQiFgSMdH 0oFkPYIJcsVmCQvnUYnOy5ThX0KYO70Nft0HAXq2/PoZNfzryPiBPgoh0ZdVbUefU2Wi 3MrarFnKXBvhHHWqWUhxJzjY0a10DvKgkGOrj0d6FXO7kkxxzhzS21dmKMUiiUue8rlK M/Jg== X-Gm-Message-State: APt69E2/lBWREmf8hy4J3oNpA06bgAOSx8dkYBtqPNDcpsczXDCsGpZY oReAIJl+fwRLTEZk/tsCkac4eSA5 X-Google-Smtp-Source: ADUXVKLNJyvU+wspdqOi3iTWn3iM39k1aor3RDC2eRvhACZSAss/yTXRMYtPZkP4PLfZSIsHxv3Rag== X-Received: by 2002:aca:4286:: with SMTP id p128-v6mr7719502oia.242.1529372720111; Mon, 18 Jun 2018 18:45:20 -0700 (PDT) Received: from localhost ([2600:1700:70:e488:b0ee:9bda:ee6f:91be]) by smtp.gmail.com with ESMTPSA id q23-v6sm10133953otd.25.2018.06.18.18.45.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:45:19 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:42:01 -0500 Message-Id: <20180619014319.28272-36-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22e Subject: [Qemu-devel] [PATCH 035/113] migration/block: reset dirty bitmap before read in bulk phase X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Lieven , qemu-stable@nongnu.org, "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Peter Lieven Reset the dirty bitmap before reading to make sure we don't miss any new data. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Lieven Message-Id: <1520507908-16743-3-git-send-email-pl@kamp.de> Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert (cherry picked from commit 86b124bc76bd7137d0fb20696c4e349571b8533d) Signed-off-by: Michael Roth --- migration/block.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migration/block.c b/migration/block.c index 7147171bb7..7dc13352d8 100644 --- a/migration/block.c +++ b/migration/block.c @@ -331,11 +331,10 @@ static int mig_save_device_bulk(QEMUFile *f, BlkMigDevState *bmds) */ qemu_mutex_lock_iothread(); aio_context_acquire(blk_get_aio_context(bmds->blk)); - blk->aiocb = blk_aio_preadv(bb, cur_sector * BDRV_SECTOR_SIZE, &blk->qiov, - 0, blk_mig_read_cb, blk); - bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, cur_sector * BDRV_SECTOR_SIZE, nr_sectors * BDRV_SECTOR_SIZE); + blk->aiocb = blk_aio_preadv(bb, cur_sector * BDRV_SECTOR_SIZE, &blk->qiov, + 0, blk_mig_read_cb, blk); aio_context_release(blk_get_aio_context(bmds->blk)); qemu_mutex_unlock_iothread();