From nobody Mon Feb 9 06:33:41 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 1507815171436689.264233690321; Thu, 12 Oct 2017 06:32:51 -0700 (PDT) Received: from localhost ([::1]:45557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2dbT-0002I2-Kp for importer@patchew.org; Thu, 12 Oct 2017 09:32:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2dJI-0003gA-GI for qemu-devel@nongnu.org; Thu, 12 Oct 2017 09:14:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2dJF-0005za-4V for qemu-devel@nongnu.org; Thu, 12 Oct 2017 09:14:00 -0400 Received: from fanzine.igalia.com ([91.117.99.155]:53203) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2dJE-0005yn-RM; Thu, 12 Oct 2017 09:13:57 -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 1e2dJD-0006pW-JK; Thu, 12 Oct 2017 15:13:55 +0200 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1e2dCy-0003ZY-AE; 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=4q1Rn7cY7d7QkOyb30liv1lsVNqPqSp2KDa/lS7tOME=; b=f9fPnIa5c+G7zMQRjmVHA8aW0T/tXUUU5/SA7we9TO8/QN4vBXiIFCKh6Yco853XEeot4LqVyHDfyF7UKhvoD3FFNO9JD99ui3ngjb/KSJ2AlhmCswt2wa4Yfup16i51B2xpgVseF4Eq3pa/+OD9HUTbKwPQFIKVYS/ZjYhXAZLUeP7LHAy6qZeHCVuQFnMidX8NPLZEdKBByZjGstl7BnZFBIaKPgoyFhmuQOBKD97XeUZ6QOX5TxEqH1H46hJE5ACAvmNdkKa5WjuMalrruhhlrnvgo6+NlVRc3IY2bHskC6Or0YcUVQ82zG8h415nKnvg4q7Zyp9eM7PKUj2Jag==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Thu, 12 Oct 2017 16:05:19 +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 05/31] qcow2: Remove BDS parameter from qcow2_cache_table_release() 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 get the cache table size (since it was equal to the cluster size). This is no longer necessary so this parameter can be removed. Signed-off-by: Alberto Garcia --- block/qcow2-cache.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index cba6a165e8..dac99e95b0 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -59,8 +59,7 @@ static inline int qcow2_cache_get_table_idx(Qcow2Cache *c= , void *table) return idx; } =20 -static void qcow2_cache_table_release(BlockDriverState *bs, Qcow2Cache *c, - int i, int num_tables) +static void qcow2_cache_table_release(Qcow2Cache *c, int i, int num_tables) { /* Using MADV_DONTNEED to discard memory is a Linux-specific feature */ #ifdef CONFIG_LINUX @@ -102,7 +101,7 @@ void qcow2_cache_clean_unused(BlockDriverState *bs, Qco= w2Cache *c) } =20 if (to_clean > 0) { - qcow2_cache_table_release(bs, c, i - to_clean, to_clean); + qcow2_cache_table_release(c, i - to_clean, to_clean); } } =20 @@ -294,7 +293,7 @@ int qcow2_cache_empty(BlockDriverState *bs, Qcow2Cache = *c) c->entries[i].lru_counter =3D 0; } =20 - qcow2_cache_table_release(bs, c, 0, c->size); + qcow2_cache_table_release(c, 0, c->size); =20 c->lru_counter =3D 0; =20 @@ -432,5 +431,5 @@ void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cac= he *c, void *table) c->entries[i].lru_counter =3D 0; c->entries[i].dirty =3D false; =20 - qcow2_cache_table_release(bs, c, i, 1); + qcow2_cache_table_release(c, i, 1); } --=20 2.11.0