From nobody Mon Feb 9 14:00:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513343928848897.1664599576304; Fri, 15 Dec 2017 05:18:48 -0800 (PST) Received: from localhost ([::1]:46237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePpsl-00053J-QC for importer@patchew.org; Fri, 15 Dec 2017 08:18:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePpVI-0000XP-M3 for qemu-devel@nongnu.org; Fri, 15 Dec 2017 07:54:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePpVE-0003Mi-PH for qemu-devel@nongnu.org; Fri, 15 Dec 2017 07:54:16 -0500 Received: from fanzine.igalia.com ([91.117.99.155]:48195) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePpVE-0003KH-5h; Fri, 15 Dec 2017 07:54:12 -0500 Received: from [192.168.12.179] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ePpV7-000845-R2; Fri, 15 Dec 2017 13:54:05 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1ePpV7-0004Cv-I1; Fri, 15 Dec 2017 14:54:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=References:In-Reply-To:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=1zRO/Exc7QBfBXbpWqbUHaLze8KR/2kv7LpoZw8Wak4=; b=WjGdrvCdWp4imXoemDogJ96O7xe+nAj6yDBUtb17m6V+DH4eScwj2XXdC3f1daVg/yb3a5GS2MVk45WoQGe3V/RDpwVf1UirR7mceP7fkDxFEIDqEJUpwoQqOidIi2kVHW0f3R+VCpZ7Fz46GOqCfM+FmWElMlxZCTrt7SYmlsTAtBXW0rNePglF/EFzzwcYWPHzki0+ErAgPeiQAxv8LzOGUIbwU8byQM15LUv99KSLKOP8+HdyGXfqdLArR/Gqmmv850JKSlqtVIuVyG3/8hIe4rkz4MqsqvwudZN3iN/OMPgiFH0CfQDsJkGy57FK0HoQr+sBoIAvTgOtFibnPA==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Fri, 15 Dec 2017 13:53:38 +0100 Message-Id: <8512f9f7a0afd366b2e951617cf553b1f16e8be6.1513342045.git.berto@igalia.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH v2 10/32] qcow2: Remove BDS parameter from qcow2_cache_discard() 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 , "Denis V . Lunev" , Alberto Garcia , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This function was only using the BlockDriverState parameter to pass it to qcow2_cache_get_table_idx() and qcow2_cache_table_release(). This is no longer necessary so this parameter can be removed. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake --- block/qcow2-cache.c | 2 +- block/qcow2-refcount.c | 6 +++--- block/qcow2.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 402ae952e0..1cf7915871 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -441,7 +441,7 @@ void *qcow2_cache_is_table_offset(BlockDriverState *bs,= Qcow2Cache *c, return NULL; } =20 -void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cache *c, void *table) +void qcow2_cache_discard(Qcow2Cache *c, void *table) { int i =3D qcow2_cache_get_table_idx(c, table); =20 diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 2c37492b4d..d3a0f7a274 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -875,12 +875,12 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(Bl= ockDriverState *bs, offset); if (table !=3D NULL) { qcow2_cache_put(s->refcount_block_cache, &refcount_block); - qcow2_cache_discard(bs, s->refcount_block_cache, table); + qcow2_cache_discard(s->refcount_block_cache, table); } =20 table =3D qcow2_cache_is_table_offset(bs, s->l2_table_cache, o= ffset); if (table !=3D NULL) { - qcow2_cache_discard(bs, s->l2_table_cache, table); + qcow2_cache_discard(s->l2_table_cache, table); } =20 if (s->discard_passthrough[type]) { @@ -3144,7 +3144,7 @@ static int qcow2_discard_refcount_block(BlockDriverSt= ate *bs, discard_block_offs); if (refblock) { /* discard refblock from the cache if refblock is cached */ - qcow2_cache_discard(bs, s->refcount_block_cache, refblock); + qcow2_cache_discard(s->refcount_block_cache, refblock); } update_refcount_discard(bs, discard_block_offs, s->cluster_size); =20 diff --git a/block/qcow2.h b/block/qcow2.h index a9d619576a..64354b6589 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -659,7 +659,7 @@ int qcow2_cache_get_empty(BlockDriverState *bs, Qcow2Ca= che *c, uint64_t offset, void qcow2_cache_put(Qcow2Cache *c, void **table); void *qcow2_cache_is_table_offset(BlockDriverState *bs, Qcow2Cache *c, uint64_t offset); -void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cache *c, void *table); +void qcow2_cache_discard(Qcow2Cache *c, void *table); =20 /* qcow2-bitmap.c functions */ int qcow2_check_bitmaps_refcounts(BlockDriverState *bs, BdrvCheckResult *r= es, --=20 2.11.0