From patchwork Wed Jan 3 10:28:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kemeng Shi X-Patchwork-Id: 184571 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp4796585dyb; Tue, 2 Jan 2024 18:33:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/tUsg3fwq0nIv86x9vjBto4M+azy/5LbXTmfiP+cuoDihUADOzFe5fYTrqTOOAOKvdaKU X-Received: by 2002:a17:902:680d:b0:1d4:b4b8:93da with SMTP id h13-20020a170902680d00b001d4b4b893damr4363140plk.114.1704249212223; Tue, 02 Jan 2024 18:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704249212; cv=none; d=google.com; s=arc-20160816; b=MvBPsatUlCO4zp71hn0MfcjeNfY/ynS6lDP4D/tCZZ/5Y4CqvKS11NszcCv/6v9Z4/ xM8j35nd2Sc7slDqsXiapN54myxgpRP6qOIeQWJ+r6w1oeIBTAW6v/yUnScWmmdWY0aq iJeawI3+lhf2zJyCY7OuSoJfCrFzRwe6eRbL62ai9xOjaWtmuyTHZGHb5/PByWinYKIO fIfH2nL8F7hpp3/vJTr+YzsmWdzBxmXA534WW2s6BD/RSvoKjCKUiqYPHHPLNq92YcSK Fcb8D2h9BTzSPURlGhpcNE5JSFA/5xrDypYS/L1tx1xJp5J+3Y1dsCz2HaMHwIbzY+fd XF9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=SIdrSeROPTSTOaS9Qiz5pnhysHcC5rSg5qIWg0uakFc=; fh=PVTZvle0rcKMDcM85KYWZlzpBmGTOtilQClZ8dUG+Hc=; b=Vyb2oZyw1vwTiQBU++adLpkgYOcGWhlh6dgWLscsBvLsGqqZoRJh8ynz++ybG3qt2G YCLho+9x+3OjVjJZYQ682TKqbppoBvzD6RwOH1tNaxzdImHRClamKeUEezXtaO0srBEU HqmHbpMz7/cPrqmkOzGks8uLrc2N1ocK9Pc5wqRAKzIpYdQRYJiZK2YOey/mMHyGGacW ZMaszWUI50/ZA0Ptbjr5kaIUX5LUn4KtrwAg6od/slNg8Lk1prPe/tpxx712u9Fx/FML 2NttMvObHuzNY3OcWVHt0mpudLlcqP3MFjrrFCUaWeJEfMg7kMnJGu4wOKWkn2PYfp8A fq9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15079-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15079-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e19-20020a170902ed9300b001d42878aa5esi17838452plj.60.2024.01.02.18.33.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 18:33:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15079-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15079-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15079-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 074D9284AB0 for ; Wed, 3 Jan 2024 02:33:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCDA618C21; Wed, 3 Jan 2024 02:30:25 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1FA1185A; Wed, 3 Jan 2024 02:30:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.235]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4T4YbT3j5Jz4f3mL0; Wed, 3 Jan 2024 10:30:13 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id C15B51A017D; Wed, 3 Jan 2024 10:30:16 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgDX2A62xpRlYWmAFQ--.14269S4; Wed, 03 Jan 2024 10:30:16 +0800 (CST) From: Kemeng Shi To: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/9] ext4: remove unused parameter group in ext4_mb_choose_next_group_*() Date: Wed, 3 Jan 2024 18:28:14 +0800 Message-Id: <20240103102821.448134-3-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20240103102821.448134-1-shikemeng@huaweicloud.com> References: <20240103102821.448134-1-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: cCh0CgDX2A62xpRlYWmAFQ--.14269S4 X-Coremail-Antispam: 1UD129KBjvJXoWxZr1xKFyfWF1kKr17Ar1k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033gof0z/ X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787034821974098128 X-GMAIL-MSGID: 1787034821974098128 Remove unused parameter group in ext4_mb_choose_next_group_*(). Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Reviewed-by: Ojaswin Mujoo --- fs/ext4/mballoc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 9f9b8dd06..765b62729 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -870,7 +870,7 @@ mb_update_avg_fragment_size(struct super_block *sb, struct ext4_group_info *grp) * cr level needs an update. */ static void ext4_mb_choose_next_group_p2_aligned(struct ext4_allocation_context *ac, - enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups) + enum criteria *new_cr, ext4_group_t *group) { struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); struct ext4_group_info *iter; @@ -944,7 +944,7 @@ ext4_mb_find_good_group_avg_frag_lists(struct ext4_allocation_context *ac, int o * order. Updates *new_cr if cr level needs an update. */ static void ext4_mb_choose_next_group_goal_fast(struct ext4_allocation_context *ac, - enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups) + enum criteria *new_cr, ext4_group_t *group) { struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); struct ext4_group_info *grp = NULL; @@ -989,7 +989,7 @@ static void ext4_mb_choose_next_group_goal_fast(struct ext4_allocation_context * * much and fall to CR_GOAL_LEN_SLOW in that case. */ static void ext4_mb_choose_next_group_best_avail(struct ext4_allocation_context *ac, - enum criteria *new_cr, ext4_group_t *group, ext4_group_t ngroups) + enum criteria *new_cr, ext4_group_t *group) { struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb); struct ext4_group_info *grp = NULL; @@ -1124,11 +1124,11 @@ static void ext4_mb_choose_next_group(struct ext4_allocation_context *ac, } if (*new_cr == CR_POWER2_ALIGNED) { - ext4_mb_choose_next_group_p2_aligned(ac, new_cr, group, ngroups); + ext4_mb_choose_next_group_p2_aligned(ac, new_cr, group); } else if (*new_cr == CR_GOAL_LEN_FAST) { - ext4_mb_choose_next_group_goal_fast(ac, new_cr, group, ngroups); + ext4_mb_choose_next_group_goal_fast(ac, new_cr, group); } else if (*new_cr == CR_BEST_AVAIL_LEN) { - ext4_mb_choose_next_group_best_avail(ac, new_cr, group, ngroups); + ext4_mb_choose_next_group_best_avail(ac, new_cr, group); } else { /* * TODO: For CR=2, we can arrange groups in an rb tree sorted by