Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1483660rwl; Wed, 5 Apr 2023 18:39:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YUNnSBAp8YOJxDISkpp6Z1KrsqvTx+SJ2jPBGPwpKg4DAyM9FFKy1hg3vkmFQBzKSjLXZL X-Received: by 2002:a17:906:6d88:b0:931:9cd2:c214 with SMTP id h8-20020a1709066d8800b009319cd2c214mr4649254ejt.66.1680745162658; Wed, 05 Apr 2023 18:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680745162; cv=none; d=google.com; s=arc-20160816; b=QeFHQVORwPhY6U/TYHN/Wm5xqllEBkHrFb2bVlrzpXebDJJj+c4TL3BnOIuHhbxlZX vuUwJCGCMD15vrlbBt7hQQnhAJhqlgIpNLdPuV+v2eXOTJU1YOKiy5j5QcLbTWWz7ST+ bY/dLWBeOaM7xsy8rqMqaPolUbTzuIhukqzaTEhL2XtkBirv+skzOQwYYa2NaMk1xJjS ljuK0lNhLFliFiztlVZ5jOIsl35hhZozixTl9NVyd7DSgjP1xsspOZQd5GW4/IFD57Tk L0vMmwDOETHEHc65+4hOiHrMyf8H5c7F8mSvtNFiCunrbZXOCialo72rm8Syiows/YDh PI7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=y/qrxn/3RrHbrbwZ5WnXBoOdS8XYcDvMckMzMUwdbB4=; b=H/5tt4Xjg3nSOwHA38PD+SOsz2aLTwmPwnj1VWzpMFJxdh3jly13cyGttvQuUKyA1+ PrQV9CwtTtBYA0kIl2JHgubvVvvqzU+YXrjMVPnWDR96fmzsz0uRY20mp5atgSNrtp8S KJIdjEP0CUkNFHnF/oh1e6xMoVYpy/GPSQ8gdpi4atVUnei/ViiVmTHLGdVnxyXCWCb8 t1HllbIh5f7LySBIRZUMOH6NXQ7/wLzCCgqFGkhTZ9JrXXMg6T6ryYbCeUPEWa4c6E/Z MMtBIFA1Ao1mGWj8kyIIHp5bJ3DkKMSbJ49lhBw7v71TsLwN78bfSMPKMw6mVVTaX4Gk LanA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id de33-20020a1709069be100b008e6bdf85401si122031ejc.869.2023.04.05.18.38.57; Wed, 05 Apr 2023 18:39:22 -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 S234523AbjDFBgX (ORCPT + 99 others); Wed, 5 Apr 2023 21:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjDFBgU (ORCPT ); Wed, 5 Apr 2023 21:36:20 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A83C76B7; Wed, 5 Apr 2023 18:36:19 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PsPGj43G0z4f3jYG; Thu, 6 Apr 2023 09:36:13 +0800 (CST) Received: from [10.174.178.129] (unknown [10.174.178.129]) by APP1 (Coremail) with SMTP id cCh0CgAnjykNIi5kn8WLGQ--.52810S2; Thu, 06 Apr 2023 09:36:15 +0800 (CST) Subject: Re: [PATCH 3/8] ext4: fix wrong unit use in ext4_mb_new_inode_pa To: Ojaswin Mujoo Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230321161220.418652-1-shikemeng@huaweicloud.com> <20230321161220.418652-4-shikemeng@huaweicloud.com> From: Kemeng Shi Message-ID: <72df8e87-6798-20f0-2524-b6430f1b3846@huaweicloud.com> Date: Thu, 6 Apr 2023 09:36:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit X-CM-TRANSID: cCh0CgAnjykNIi5kn8WLGQ--.52810S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Gr17uF18trWfZF15XFWrXwb_yoW8JrW7pF s7JFyjka4fWw1UCrs7G3Z8Gr1Y93y2gF18J345ta45uF9rWrW8Aan2y348Wr9xGr4jyF1F vFs2ga45Gw47uaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUyKb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04k20xvY0x0E wIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04 k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY 1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUzsqWUUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.7 required=5.0 tests=KHOP_HELO_FCRDNS,MAY_BE_FORGED, NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE autolearn=no 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 4/6/2023 3:26 AM, Ojaswin Mujoo wrote: > On Wed, Mar 22, 2023 at 12:12:15AM +0800, Kemeng Shi wrote: >> fe_logical and win are both in block unit. Remove wrong convertion for >> win from block unit to cluster unit. >> >> Signed-off-by: Kemeng Shi >> --- >> fs/ext4/mballoc.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c >> index 7f695830621a..86d978e1f7dc 100644 >> --- a/fs/ext4/mballoc.c >> +++ b/fs/ext4/mballoc.c >> @@ -4640,8 +4640,7 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac) >> if (offs && offs < win) >> win = offs; >> >> - ac->ac_b_ex.fe_logical = ac->ac_o_ex.fe_logical - >> - EXT4_NUM_B2C(sbi, win); >> + ac->ac_b_ex.fe_logical = ac->ac_o_ex.fe_logical - win; >> BUG_ON(ac->ac_o_ex.fe_logical < ac->ac_b_ex.fe_logical); >> BUG_ON(ac->ac_o_ex.fe_len > ac->ac_b_ex.fe_len); > > So this bit of code is removed in the patchset I sent here [1]. My patchset > is mostly ready to be merged and Ted did mention that he was going to > pick that up soon. So would it be okay with you if we drop this particular patch? Sure, I will drop this in next version. >> } >> -- >> 2.30.0 >> > -- Best wishes Kemeng Shi