Message ID | 20230228114306.3328235-3-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2791456wrd; Mon, 27 Feb 2023 19:43:38 -0800 (PST) X-Google-Smtp-Source: AK7set+9rCfCcj7q0oUEGfC2wpm8YalFZ/qpIRmRLQRfoeuWSuxrMvOdlka0gIUTQfmirxFVl49b X-Received: by 2002:a05:6a20:9389:b0:bc:f336:98ed with SMTP id x9-20020a056a20938900b000bcf33698edmr2212605pzh.45.1677555817883; Mon, 27 Feb 2023 19:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677555817; cv=none; d=google.com; s=arc-20160816; b=t9POIGmKmm6pAa/Wf2mS47nm2D5jHCY/SluvITrWuXj7f8nh2m8R13FXrwymBUVBan Aa2DaFNL7wEX7HQP1kQPViA0mc8jDNxSl4Wn/YU+WB4M9iTWjjreUGj2PNnpivUWtCzA HlL4lWsKwOZ427EODg1XO0NoCKoSayYMEp+RlWkKiNPJSWuiwWia8/18gzGmxyLbDScG s7LFm02cy6GcakrfpzKOFY8nkRxJ05XT8jImwDJ1j1KIEs9EwXpoPvyuL8gB2YOROYlS BJJXlYorrlXYM6KR5ktTZI+tqbtVvR80myK7Pc5FY02Rk66r/Q0ucPjN9TcdnxxXfLVD 5SLw== 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=SYPAfTpCP6Ti1pgu0PaQXk3MG7NTFufMYfMVERwIzkI=; b=FiyGi02KxkadenUWIa/XowSIb1/juf5Dc16SIf2SEykzEnzMrkyzdT6M6odFpvTVqc 8ANHuEVyJgrcG2e0b4f8bG7/UkvHAJdhuZ0lHXSmOfbyG5iqGWivPV55kcD1bm2J24Fk hdyTLZ0QfJtrjVIVeC7rylMzAnb+pRSLo6KaiRH9DuRXFIhGZm4WbnoF8zmJGRE86/md wiIIVwSKd6bObNwv2EfTCkZqFC978f37FQDv+sY9nd85ZAxI7oyNeqQfhDCq4nnxzNmp goMIW0P25TgXHH5Urmr0xo5xZl/OBHTTmDhf2pY3UC7RZL3s4b9mi26LQT3ap/y515ZK 4aJg== 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 e10-20020a63e00a000000b00476e640ddfesi8605750pgh.80.2023.02.27.19.43.23; Mon, 27 Feb 2023 19:43:37 -0800 (PST) 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 S230208AbjB1Dlo (ORCPT <rfc822;liqunnana@gmail.com> + 99 others); Mon, 27 Feb 2023 22:41:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjB1Dlh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Feb 2023 22:41:37 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D0D5241E6; Mon, 27 Feb 2023 19:41:33 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4PQjpK1BFbz4f3p0y; Tue, 28 Feb 2023 11:41:29 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDnjOrod_1jpDeZEQ--.58449S4; Tue, 28 Feb 2023 11:41:30 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, ojaswin@linux.ibm.com, ritesh.list@gmail.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH v2 02/20] ext4: allow to find by goal if EXT4_MB_HINT_GOAL_ONLY is set Date: Tue, 28 Feb 2023 19:42:48 +0800 Message-Id: <20230228114306.3328235-3-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230228114306.3328235-1-shikemeng@huaweicloud.com> References: <20230228114306.3328235-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgDnjOrod_1jpDeZEQ--.58449S4 X-Coremail-Antispam: 1UD129KBjvdXoWrury7ur4xtw1kZr4DtFW7twb_yoWDKFcE9F yUAr1xZan5Jw1fu3Z5AayFkF1vgF4Fqr4rWF4rXrZxXF4UXw1Iya4qyr4fZwn2kw17Z343 u34YgFyxJr4IqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbqAYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l87I20VAvwVAaII0Ic2I_JFv_Gryl82 xGYIkIc2x26280x7IE14v26r15M28IrcIa0xkI8VCY1x0267AKxVW8JVW5JwA2ocxC64kI II0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7 xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2 z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4 xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v2 6r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6I AqYI8I648v4I1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAq x4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r 43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF 7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxV WUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjTR QNVDUUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, SPF_HELO_NONE,SPF_NONE 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: <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?1759044769272951642?= X-GMAIL-MSGID: =?utf-8?q?1759044769272951642?= |
Series |
Some bugfix and cleanup to mballoc
|
|
Commit Message
Kemeng Shi
Feb. 28, 2023, 11:42 a.m. UTC
If EXT4_MB_HINT_GOAL_ONLY is set, ext4_mb_regular_allocator will only allocate blocks from ext4_mb_find_by_goal. Allow to find by goal in ext4_mb_find_by_goal if EXT4_MB_HINT_GOAL_ONLY is set or allocation with EXT4_MB_HINT_GOAL_ONLY set will always fail. EXT4_MB_HINT_GOAL_ONLY is not used at all, so the problem is not found for now. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> --- fs/ext4/mballoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 0650a1dc870e..375d9655b525 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2162,7 +2162,7 @@ int ext4_mb_find_by_goal(struct ext4_allocation_context *ac, struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); struct ext4_free_extent ex; - if (!(ac->ac_flags & EXT4_MB_HINT_TRY_GOAL)) + if (!(ac->ac_flags & (EXT4_MB_HINT_TRY_GOAL | EXT4_MB_HINT_GOAL_ONLY))) return 0; if (grp->bb_free == 0) return 0;