From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FEB5C0015E for ; Mon, 24 Jul 2023 12:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbjGXMOA (ORCPT ); Mon, 24 Jul 2023 08:14:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbjGXMN6 (ORCPT ); Mon, 24 Jul 2023 08:13:58 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B01B4E61; Mon, 24 Jul 2023 05:13:57 -0700 (PDT) Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R8fFF2Vldz1KCCg; Mon, 24 Jul 2023 20:13:05 +0800 (CST) Received: from huawei.com (10.175.127.227) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 24 Jul 2023 20:13:55 +0800 From: Baokun Li To: CC: , , , , , , , , , Subject: [PATCH v2 0/3] ext4: fix some ext4_lblk_t overflow issues Date: Mon, 24 Jul 2023 20:10:56 +0800 Message-ID: <20230724121059.11834-1-libaokun1@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500021.china.huawei.com (7.185.36.21) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Changes since v1: * Rename fex_end() and pa_end() to extent_logical_end() and pa_logical_end() to make the code more readable. * Refactor the logic for adjusting the best extent in ext4_mb_new_inode_pa() to simplify the code and remove redundant parameter for helper function. * Merged patch 4 to patch 1 as mainline commit 9d3de7ee192a fixed the issue. Baokun Li (3): ext4: add two helper functions extent_logical_end() and pa_logical_end() ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow ext4: avoid overlapping preallocations due to overflow fs/ext4/mballoc.c | 61 +++++++++++++++++++++-------------------------- fs/ext4/mballoc.h | 14 +++++++++++ 2 files changed, 41 insertions(+), 34 deletions(-) -- 2.31.1