From nobody Sat Nov 15 22:26:56 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=dupond.be ARC-Seal: i=1; a=rsa-sha256; t=1747142853; cv=none; d=zohomail.com; s=zohoarc; b=Qvi/yd/5mQekDnIOTPYu67aPxzjTIwnfotoMjZNzY9NBkg+NwZiS3Rm7RFIq+wxTxqu/s2EMoQgmjO7f9Mm2nqTw9Hi4NbnRGvdr/mO7OQJsP285APlxatVVMcu4D1G7AdniQRac8hoRq1ojzlTQr8vnkb0++1BrvuDyH+kl71o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747142853; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=99J0rIeuUVgTKW9n/MWFRRiskaq30r22kpTzoYJPRJQ=; b=nLW8nEb2oZtlklqKlJdlRLbIsE5NkGt0/blsQN8XM7MN7dkvIfer7ko5xhuqctJGf1pJQkCu43X96aFdY+y4xZZm1qNdUthvbNEFcO1rHOfeSSG+4OTmZfDBMQkMevUsiU6Wzd/5b/JeUN1uSWCLC+8RgRTGFKpEYFbCl8YKm20= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1747142853637959.8403302576517; Tue, 13 May 2025 06:27:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uEpeu-0006Tt-6u; Tue, 13 May 2025 09:27:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uEper-0006SH-Hu; Tue, 13 May 2025 09:26:57 -0400 Received: from apollo.dupie.be ([51.159.20.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uEpej-00073k-NI; Tue, 13 May 2025 09:26:57 -0400 Received: from localhost.localdomain (unknown [IPv6:2a00:1c98:fff1:1001:aee7:ee9c:3ae8:78e2]) by apollo.dupie.be (Postfix) with ESMTPSA id 249BE1520F7B; Tue, 13 May 2025 15:26:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dupond.be; s=dkim; t=1747142803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=99J0rIeuUVgTKW9n/MWFRRiskaq30r22kpTzoYJPRJQ=; b=jyHuf6LbpsWTsLICEj0ZKC9OK5O1pNPwVjwp1rTHi+tV4TwDgH3J4ZtoUeYqbF0Dl2tJnM pywGkFbPw9IT7O+/vNaJPyjomuF3eJVFeFKEwOTtVLUDKFQoZDwxeOSTNTynAslDdQYmsW n/GzRT2RiZyfVtIHXwetFRm9bmEfEU2chrWiHK5YWyijHoH9FSXqpOhCs6ZzunWh/Pr44B ZrbXCmVglKsNAwHEuyObccI8ZWaJG7/ULNqrrilddkYpXoE2nG9Q6145FBxSKEnLCxrJct 1t9xFIM99RPomiJFuKm3xfvKrzwlVPvFJV5sZEACxAsDL01+Stg/stTkzMPkaQ== From: Jean-Louis Dupond To: qemu-devel@nongnu.org Cc: Hanna Reitz , Kevin Wolf , Alexander Ivanov , Andrey Drobyshev , qemu-block@nongnu.org, Jean-Louis Dupond Subject: [PATCH v2 1/2] qcow2: rename update_refcount_discard to queue_discard Date: Tue, 13 May 2025 15:26:27 +0200 Message-ID: <20250513132628.1055549-2-jean-louis@dupond.be> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250513132628.1055549-1-jean-louis@dupond.be> References: <20250513132628.1055549-1-jean-louis@dupond.be> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=51.159.20.238; envelope-from=jean-louis@dupond.be; helo=apollo.dupie.be X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @dupond.be) X-ZM-MESSAGEID: 1747142857685019000 Content-Type: text/plain; charset="utf-8" The function just queues discards, and doesn't do any refcount change. So let's change the function name to align with its function. Signed-off-by: Jean-Louis Dupond Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 0266542cee..8fb210501c 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -754,8 +754,8 @@ void qcow2_process_discards(BlockDriverState *bs, int r= et) } } =20 -static void update_refcount_discard(BlockDriverState *bs, - uint64_t offset, uint64_t length) +static void queue_discard(BlockDriverState *bs, + uint64_t offset, uint64_t length) { BDRVQcow2State *s =3D bs->opaque; Qcow2DiscardRegion *d, *p, *next; @@ -902,7 +902,7 @@ update_refcount(BlockDriverState *bs, int64_t offset, i= nt64_t length, } =20 if (s->discard_passthrough[type]) { - update_refcount_discard(bs, cluster_offset, s->cluster_siz= e); + queue_discard(bs, cluster_offset, s->cluster_size); } } } @@ -3619,7 +3619,7 @@ qcow2_discard_refcount_block(BlockDriverState *bs, ui= nt64_t discard_block_offs) /* discard refblock from the cache if refblock is cached */ qcow2_cache_discard(s->refcount_block_cache, refblock); } - update_refcount_discard(bs, discard_block_offs, s->cluster_size); + queue_discard(bs, discard_block_offs, s->cluster_size); =20 return 0; } --=20 2.49.0