From nobody Thu Dec 18 13:17:22 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557242823; cv=none; d=zoho.com; s=zohoarc; b=UTKrg30yhECfq6I4vHWjYl6cV70XXVK5AIzBUOx8ua0Vop6n1oCAPH8er/1dZbXOxLBMeh3EnnJ3ZMdyzS++iYd6D1qeQaUpgDghgvB/c2LNjyhqn5i6sMqcPWJdrqjal6Dnf+kDzIY2gDQJ0Ezi3Jjs61xgA82NKX1wIPmeA5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557242823; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=VcHB4btVW3nFfNCeNTbdlR03P0zeWmzABPUX9Atcsz0=; b=OiBlFE9W4lUzTvKgH6m7/7DjaXvfyEcnaNyXYK4Vi0xS+b/2AgGH26KtlanWHqjcqcBI1YgT3YTc0WVftpXv7522PbGNE16X8OsUwRqGvYCvrCy+HsAPZ3WjvixwJEUUiIXSDMnjHIkPxDxYEMFdZNjcI6SVvBN1W17GZcwOnB4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557242823097799.2583816783188; Tue, 7 May 2019 08:27:03 -0700 (PDT) Received: from localhost ([127.0.0.1]:48582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO1zc-0006uJ-3C for importer@patchew.org; Tue, 07 May 2019 11:26:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO1rb-0007xj-VQ for qemu-devel@nongnu.org; Tue, 07 May 2019 11:18:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO1rb-0003zX-4o for qemu-devel@nongnu.org; Tue, 07 May 2019 11:18:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50150) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hO1rY-0003xT-Vc; Tue, 07 May 2019 11:18:37 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50C30C057F32; Tue, 7 May 2019 15:18:36 +0000 (UTC) Received: from localhost (unknown [10.40.205.217]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC32761B85; Tue, 7 May 2019 15:18:35 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 7 May 2019 17:18:14 +0200 Message-Id: <20190507151819.17401-7-mreitz@redhat.com> In-Reply-To: <20190507151819.17401-1-mreitz@redhat.com> References: <20190507151819.17401-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 07 May 2019 15:18:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PULL 06/11] qcow2: discard bitmap when removed 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 , Peter Maydell , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Andrey Shinkevich Bitmap data may take a lot of disk space, so it's better to discard it always. Signed-off-by: Andrey Shinkevich Message-id: 1551346019-293202-1-git-send-email-andrey.shinkevich@virtuozzo.= com Reviewed-by: Vladimir Sementsov-Ogievskiy [mreitz: Use the commit message proposed by Vladimir] Signed-off-by: Max Reitz --- 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 e53a1609d7..8a75366c92 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -202,7 +202,7 @@ static void clear_bitmap_table(BlockDriverState *bs, ui= nt64_t *bitmap_table, continue; } =20 - qcow2_free_clusters(bs, addr, s->cluster_size, QCOW2_DISCARD_OTHER= ); + qcow2_free_clusters(bs, addr, s->cluster_size, QCOW2_DISCARD_ALWAY= S); bitmap_table[i] =3D 0; } } --=20 2.20.1