Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9878466rwr; Fri, 12 May 2023 00:03:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4QBOTAl5UB89pRuokqEiNfHwnGoUsGtaIUuSYMAqeVTlbJxi9lQ+p6ozStl8oYR4wcWaXO X-Received: by 2002:a05:6a20:8e10:b0:100:a636:6f22 with SMTP id y16-20020a056a208e1000b00100a6366f22mr21194526pzj.19.1683875030290; Fri, 12 May 2023 00:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683875030; cv=none; d=google.com; s=arc-20160816; b=NXB48sF5NBfyePwsocByfQcJkvZamui8lu5oUn73kS7EgrLdL2QCEqKbL8XX2A5SRO PTllqkuKr/zvX8qWC+uqFCILir4Aw+ZBSm8b27wysAv/+ngbll37naENbKazqUkUFmmY 9Gu9BcEEzB10cUcZfyfQZWxhChfvf9bZbFrueJwakV/zZLnIJhB5szqmLmAI4o806QaB s30fM2OwaN7L4/Im0E3pigfpyPFcwC/nHV6a/Lr7L0BeqWcS/VK+9fLagZWG4wvLaHH8 Lyr8XT+nulK/NDPRvTsAXpSzeeRrAMaUHPQg2MI+q6o2Gc9Qn+hiiEMucjqaFcKMWbsF FyZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=k6eQEwVkhHpVFgAToRNikXg7UybtiNVZ4Ox/Wo9gFn4=; b=db7ewbGB7hL4aopd1P9Xpf937Fd7CfEK8q+m9Eid3/V1UUc7mwrakijuC6HRCJ4Rhj CnHZorKdZNwj28VOik+rwV00zwajAvXTf89KbESZdsGy8RNpLCuOLoUW3zNxp1Rt7zft EQonK30ozt1EfrkT2bWFeveBJuDIdriCc9jKOBHiFQRXyHPGPsgt48VGQ3QAJJqRvKfe 0BJZ++LUnUxbq+rnGRmGTcpXWLUmcdv3rZAGLApM7LgrzshFylt+GvYjbgh5rfjDt9am 57NZzmBvF5pVY/wQOvwivS0CYJ23YtTULrNuEQtWp3VIJmTqGWzvTUH0tdKoqQwv7x11 p/7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=afuIfYNV; 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; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a633c0b000000b0051b9ce24708si8501923pga.103.2023.05.12.00.03.35; Fri, 12 May 2023 00:03:50 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=afuIfYNV; 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; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240008AbjELG4E (ORCPT + 99 others); Fri, 12 May 2023 02:56:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239702AbjELG4C (ORCPT ); Fri, 12 May 2023 02:56:02 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F6E7D873; Thu, 11 May 2023 23:56:02 -0700 (PDT) Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34C6muFm003626; Fri, 12 May 2023 06:55:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=k6eQEwVkhHpVFgAToRNikXg7UybtiNVZ4Ox/Wo9gFn4=; b=afuIfYNV/CV/bea++cAGmUojjKZWyjkHKFQWXX0/a8BYrlHGPbSOol4x6Fgxit3fO8PM KazdkFF63STxX0NQ9uNQyzYD9T0q4/Qgm+twrVicUexXef8ZxXpbdx+r5wD3+cnizwZH iohvEem3kRPwX14m0nzGRoT0GVbns6JJGF8+3GskrKFN9EyMTlshGuxcatzTGCPruYS6 WiV7kpC0nRT2HKsOmSVVLc9mUuBHmL2voA9g6fipw9p3bZp7cwJIOEurYClDY2wrfUJe S8DINSSpzen3f+7ItNkmjZctlF9an24FTgtQ48iufq9/bb1G5EbHpXFmbObXXXMgRYQy 5w== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qhg7cgvq9-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 06:55:51 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34C1ceT6024739; Fri, 12 May 2023 06:37:36 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma04ams.nl.ibm.com (PPS) with ESMTPS id 3qf7nh25gj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 06:37:36 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34C6bXBc23200300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 May 2023 06:37:33 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4883F20043; Fri, 12 May 2023 06:37:33 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D86E820040; Fri, 12 May 2023 06:37:31 +0000 (GMT) Received: from li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com (unknown [9.43.7.84]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTPS; Fri, 12 May 2023 06:37:31 +0000 (GMT) Date: Fri, 12 May 2023 12:07:29 +0530 From: Ojaswin Mujoo To: Kemeng Shi Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 10/19] ext4: fix wrong unit use in ext4_mb_clear_bb Message-ID: References: <20230417110617.2664129-1-shikemeng@huaweicloud.com> <20230417110617.2664129-11-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230417110617.2664129-11-shikemeng@huaweicloud.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: ehlFx9-cTiO-Z2o7TmGiQMj3PWU3xf19 X-Proofpoint-GUID: ehlFx9-cTiO-Z2o7TmGiQMj3PWU3xf19 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-12_03,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 spamscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 mlxscore=0 mlxlogscore=983 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305120056 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Feel free to add: Reviewed-by: Ojaswin Mujoo > --- > 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 >