Message ID | 20230417110617.2664129-11-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1848285vqo; Sun, 16 Apr 2023 20:05:58 -0700 (PDT) X-Google-Smtp-Source: AKy350astLC823jY9ol1PEOcnQMWbDUSxT8pew/MVfZAiQspVAvDxSj90gFM5TDMP2zkOaiptsWE X-Received: by 2002:a17:902:dacf:b0:1a1:a727:a802 with SMTP id q15-20020a170902dacf00b001a1a727a802mr12387744plx.19.1681700757841; Sun, 16 Apr 2023 20:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681700757; cv=none; d=google.com; s=arc-20160816; b=0ijEctwkUyLWdSKSIaTYvgKbCk/ashYN7kR5ADMjygTLNpqWLbUOmxkJ3ceLopxrqi L/bBnVWsuOtAtF/ZEVza/YMSvUI87D0QpaZyNWEhn0NlPSJbY/9UDDDs9YTOZrMfovms UrgA/MWGTdjYM1LWDxpq3DtXDenJuz7wM6fIUd0hMqWMU24mQwAen0xR9c+Fx0C6zdQQ IoEPsSuQ7A6X2BKo3yhuViZ2n308UCKTmL68NyY7y3vvMIUdO/JgUZsyTJG4VS42XL+F /iATBD+Gt2zJ5dCB/7pTqhCuusfPYrqXBC9ZG/D0R4EjtBg+Fz/k5jlKqlEAa9zjxTWp cHBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ESbfsLOZ0u8XrsKL7/qeQQxIfRpLBcwncbXJgCP5vEg=; b=LpRACp4CIP7IotYkae/Ru+JOO7VDxhsDcIPhN/ORIzr2SaigWNbvb8IwM7wNWY2Mo0 mg0XBDdpTepCGNToRp9LMmwLxJqrMVp6t32JqWTN7pSqe8ia3rsjgKXEecFe0c/YG9SL D1dUhhBiPepuWaw5ix2+34Bsn91BlNDM27TZDbTKp56MPzmfw06cAtGTmzh8A5Opvjmj uYVzUrmfTFqhYvrtOePh4vD/2Boq1tAjIjAec4zO1PBHYyc45UljBp10wdnXqY5og6Sa ueVbTLKNJEy1y5vpTM1s0czJ0m9eAsvwezh4F1swY34KX7MLhDbj69KISnJq5leyqAqd Xztw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c9-20020a170902c1c900b001a20c983d21si10733989plc.51.2023.04.16.20.05.44; Sun, 16 Apr 2023 20:05:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230033AbjDQDFB (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Sun, 16 Apr 2023 23:05:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjDQDEC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 16 Apr 2023 23:04:02 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B75EB2D45; Sun, 16 Apr 2023 20:04:01 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Q0Bhr1BrWz4f47kZ; Mon, 17 Apr 2023 11:03:56 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgAXODIXtzxkfzJgHA--.17426S12; Mon, 17 Apr 2023 11:03:57 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: tytso@mit.edu, adilger.kernel@dilger.ca, ojaswin@linux.ibm.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH v3 10/19] ext4: fix wrong unit use in ext4_mb_clear_bb Date: Mon, 17 Apr 2023 19:06:08 +0800 Message-Id: <20230417110617.2664129-11-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230417110617.2664129-1-shikemeng@huaweicloud.com> References: <20230417110617.2664129-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgAXODIXtzxkfzJgHA--.17426S12 X-Coremail-Antispam: 1UD129KBjvdXoW7Wr1rAr4xZFWDGw1xWFyfJFb_yoW3Kwb_K3 WDArZ7GryrJwn7CFn3tw45tFZ0gr4FkFyUXF1fKF4xu3W5Wa97u34DJrW5Ar1xWFW3t3y3 C3ZYvryfCFWS9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbDAFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJ M28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2I x0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK 6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4 xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8 JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20V AGYxC7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAF wI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc4 0Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AK xVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRvJPtU UUUU= X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=2.5 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, KHOP_HELO_FCRDNS,MAY_BE_FORGED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763391053999065357?= X-GMAIL-MSGID: =?utf-8?q?1763391053999065357?= |
Series |
Fixes, cleanups and unit test for mballoc
|
|
Commit Message
Kemeng Shi
April 17, 2023, 11:06 a.m. UTC
Function ext4_issue_discard need count in cluster. Pass count_clusters
instead of count to fix the mismatch.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
fs/ext4/mballoc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Mon, Apr 17, 2023 at 07:06:08PM +0800, Kemeng Shi wrote: > Function ext4_issue_discard need count in cluster. Pass count_clusters > instead of count to fix the mismatch. > > Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Feel free to add: Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> > --- > fs/ext4/mballoc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > index 774f969b39d8..4a345e3c1c78 100644 > --- a/fs/ext4/mballoc.c > +++ b/fs/ext4/mballoc.c > @@ -6222,8 +6222,8 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode, > * them with group lock_held > */ > if (test_opt(sb, DISCARD)) { > - err = ext4_issue_discard(sb, block_group, bit, count, > - NULL); > + err = ext4_issue_discard(sb, block_group, bit, > + count_clusters, NULL); > if (err && err != -EOPNOTSUPP) > ext4_msg(sb, KERN_WARNING, "discard request in" > " group:%u block:%d count:%lu failed" > -- > 2.30.0 >
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 774f969b39d8..4a345e3c1c78 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -6222,8 +6222,8 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode, * them with group lock_held */ if (test_opt(sb, DISCARD)) { - err = ext4_issue_discard(sb, block_group, bit, count, - NULL); + err = ext4_issue_discard(sb, block_group, bit, + count_clusters, NULL); if (err && err != -EOPNOTSUPP) ext4_msg(sb, KERN_WARNING, "discard request in" " group:%u block:%d count:%lu failed"