From nobody Mon Feb 9 05:13:44 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1507814830801536.0011481315726; Thu, 12 Oct 2017 06:27:10 -0700 (PDT) Received: from localhost ([::1]:45518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2dVx-0005gz-3U for importer@patchew.org; Thu, 12 Oct 2017 09:27:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2dI7-0002hW-Hs for qemu-devel@nongnu.org; Thu, 12 Oct 2017 09:12:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2dI6-0004sf-I9 for qemu-devel@nongnu.org; Thu, 12 Oct 2017 09:12:47 -0400 Received: from fanzine.igalia.com ([91.117.99.155]:52921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2dI6-0004qw-8P; Thu, 12 Oct 2017 09:12:46 -0400 Received: from a88-114-101-76.elisa-laajakaista.fi ([88.114.101.76] helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1e2dI4-0006pW-TJ; Thu, 12 Oct 2017 15:12:45 +0200 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1e2dCy-0003Zp-I5; Thu, 12 Oct 2017 16:07:28 +0300 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=788QrZzELYDioLFlTf2aI2xBaR/vcWzI7tuQ7P+lyQs=; b=meF9n42DXd7NeQcbaJd6o2pFVtlThlCs6zX04InuFmqy/5wQwdHjI4CDqbz2e3AxUVniRMKf6zy235Q7/aZiTySa8y+koRiN6CVMwZBdcgnqKy1TEZAUDX9JeTtxJgffeomFIbMkYTurye/XBRya8m3MuMHSDBp6xJq7ttgLo1/cyy+36quEjpD6YBgzt1ZUyLcmcVGdJWH6prFqLemuWLIKA4yrJi2BeDUKgbhZNe84dzv2mbczD7G1lNkQnj32N4YHsg0m/g3srcu6bn6wLfwI1iTbmgsBTbS9QZc7n5etzL15M4WGWmbYZ74aT8d13aDEgn9mJ3uLs96NEvG4Mw==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Thu, 12 Oct 2017 16:05:24 +0300 Message-Id: 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 10/31] 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 --- 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 cc7995c4bf..4775bec838 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -420,7 +420,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 e93c1acd79..6eb71a2a5f 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -868,12 +868,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]) { @@ -3106,7 +3106,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 9e6b5102f0..ec0225c016 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -665,7 +665,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