From patchwork Tue Mar 5 23:43:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 10840219 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F10651669 for ; Tue, 5 Mar 2019 23:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCEF02C4C2 for ; Tue, 5 Mar 2019 23:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE5D52D019; Tue, 5 Mar 2019 23:47:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A7B82C4C2 for ; Tue, 5 Mar 2019 23:47:31 +0000 (UTC) Received: from localhost ([127.0.0.1]:51104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1JmU-0001PC-SX for patchwork-qemu-devel@patchwork.kernel.org; Tue, 05 Mar 2019 18:47:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1Jiw-0007Hz-T3 for qemu-devel@nongnu.org; Tue, 05 Mar 2019 18:43:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1Jiu-0005n0-VT for qemu-devel@nongnu.org; Tue, 05 Mar 2019 18:43:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60078) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1Jiq-0005gU-22; Tue, 05 Mar 2019 18:43:44 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56C1D307E042; Tue, 5 Mar 2019 23:43:43 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-232.bos.redhat.com [10.18.17.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9165B60260; Tue, 5 Mar 2019 23:43:42 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Tue, 5 Mar 2019 18:43:35 -0500 Message-Id: <20190305234337.18353-4-jsnow@redhat.com> In-Reply-To: <20190305234337.18353-1-jsnow@redhat.com> References: <20190305234337.18353-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 05 Mar 2019 23:43:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/5] block/qcow2-bitmap: don't remove bitmaps on reopen 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: Kevin Wolf , vsementsov@virtuozzo.com, qemu-block@nongnu.org, Max Reitz , John Snow Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP We tend to remove bitmaps when we flush them to disk, but it's not appropriate in all cases. let the reopen mechanism use the lighter weight flush instead of the heavier store. Signed-off-by: John Snow --- block/qcow2-bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 4e11b6b05a..9373055d3b 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -1560,7 +1560,7 @@ int qcow2_reopen_bitmaps_ro(BlockDriverState *bs, Error **errp) BdrvDirtyBitmap *bitmap; Error *local_err = NULL; - qcow2_store_persistent_dirty_bitmaps(bs, &local_err); + qcow2_flush_persistent_dirty_bitmaps(bs, &local_err); if (local_err != NULL) { error_propagate(errp, local_err); return -EINVAL;