Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4287097rwo; Tue, 25 Jul 2023 03:56:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGNGhk1XIyOEu9ZD0IJuUS48+ifRGnQuHPrzPY+78gxZJNtMjB1q1e5olzMJM+qBqSeKrHe X-Received: by 2002:a05:6a20:7489:b0:134:d4d3:f0aa with SMTP id p9-20020a056a20748900b00134d4d3f0aamr12254282pzd.2.1690282603951; Tue, 25 Jul 2023 03:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690282603; cv=none; d=google.com; s=arc-20160816; b=pucsnzNikLmDWxpBiKbZA6fS59DSuOvdcgrPpcPAG/8W7htFuM9VF6fpxnyu2uC/dD ONOW57WudS2gVkzgwUHq7pVstvp0ZNq6y331w+L71oF1n2wH1NWvtUtiQiru5Fa4ZVaR vbLQjLNUXvoii8kay6e28bTAiA1+X+F/okDP3qhZPSWyD2sZGVYIEMnTp9lCwNxfvpZf KrB4HnKsa9yOkRjLjFptyHY4dDx20sA2KBrTSe5Qrk+NBqt2keFuEXaBMES4rCTpZTfc 7sVA8t8f7CbrtjakvAMktZfUhZiIpT8Rv3Vo6lBOh4K310WzJJEkSIDjhZluqgWVPaQh cD1Q== 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 :message-id:date:subject:cc:to:from; bh=xVPcJZIqLkqD1mAKzEul3mwIgytSlCxvdIT9+HVk07w=; fh=MlGqaUnvBjpXmiP990bdf+mzv9VjPrVaE5OVdv29XYE=; b=ZwrTvnwlnBIoBQFGzFo0Rvpvt3sJ1vNfh9g6wWD0LJndq2L4tZtNUmWycPL4QVxzsE MFD/C2wtACLbWpRl4WW0CalQz2G1E90illFY/adWxW3gXGcOhL+Rey03e7sJry2zhna/ 1Jt3RAyBi4pcDZMifhiJY745QNEhFBa8yy+9CQVgje7kUjUnRXAiDdeIeTxYB7BmII4l iFume6DUPwYhhHQqcqn3oJrI+78ZKwd8+T0FxoyVXBGTx2tBjNMJ2gCnLRYOcJ3Mw0jv e7lN1ZLf1oruA92yqipkGSQoo9oloHUwslXDtciIKAAyM+9B0hHEd14OGnqceTYZHA/C AakQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 u23-20020a634717000000b0053fb85dd81asi11075910pga.325.2023.07.25.03.56.30; Tue, 25 Jul 2023 03:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231527AbjGYKwA (ORCPT + 99 others); Tue, 25 Jul 2023 06:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233792AbjGYKvM (ORCPT ); Tue, 25 Jul 2023 06:51:12 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2829F2723; Tue, 25 Jul 2023 03:50:45 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R9DMd2zBcz4f3p0M; Tue, 25 Jul 2023 18:50:37 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgC3quj+qL9kl7XQOg--.17520S2; Tue, 25 Jul 2023 18:50:39 +0800 (CST) From: Kemeng Shi To: tytso@mit.edu, adilger.kernel@dilger.ca, ritesh.list@gmail.com, ojaswin@linux.ibm.com, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH v2 00/10] A few fixes and cleanups to mballoc Date: Wed, 26 Jul 2023 02:50:56 +0800 Message-Id: <20230725185106.2147273-1-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgC3quj+qL9kl7XQOg--.17520S2 X-Coremail-Antispam: 1UD129KBjvJXoW7AF4xAr1xAw18Kr1xXFy7ZFb_yoW8Jw4xpr ZxGry3t34fKr17JFZxAayFq3WrWws7Ar47XF1a934kGry7Cr92v3ZrKF18ZFyUAFWDGFn8 Xr9xZF45Ga17CaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvF14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2ocxC64kIII 0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xv wVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4 x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG 64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r 1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAq YI8I648v4I1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4 xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1D MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I 0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv67AK xVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvj TRNgAwUUUUU 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, KHOP_HELO_FCRDNS,MAY_BE_FORGED,SPF_HELO_NONE,SPF_NONE, 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-ext4@vger.kernel.org v1->v2: Collect review-by from Ritesh and do improve as Ritesh suggested: -Keep checks inside unlikely() in patch 1 -Add missed fixes tags in patch 1, 2 and 10 -Fix typo, fix conflic and kill one more return in patch 5 Hi all, this series contains some random fixes and cleanups to mballoc which include correct grp validation, fix data overflow and so on. More details can be found in respective patches. Besides, 'kvm-xfstest smoke' runs successfully without error. Thanks! Kemeng Shi (10): ext4: correct grp validation in ext4_mb_good_group ext4: avoid potential data overflow in next_linear_group ext4: return found group directly in ext4_mb_choose_next_group_p2_aligned ext4: use is_power_of_2 helper in ext4_mb_regular_allocator ext4: remove unnecessary return for void function ext4: replace the traditional ternary conditional operator with with max()/min() ext4: remove unused ext4_{set}/{clear}_bit_atomic ext4: return found group directly in ext4_mb_choose_next_group_goal_fast ext4: return found group directly in ext4_mb_choose_next_group_best_avail ext4: correct some stale comment of criteria fs/ext4/ext4.h | 2 -- fs/ext4/mballoc.c | 89 ++++++++++++++++++----------------------------- 2 files changed, 33 insertions(+), 58 deletions(-) -- 2.30.0