From patchwork Wed Jan 14 22:56:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1512 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431493; bh=VnXp8ZKuFcOmUS13lCU88Ga+DIpb6vyBDAf3ieguFL4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oLbc76ifT5rKkQLPvtpgumnwuQcFVtXM4RjGj7bLw5Fk6UVCUv8aVqynLHs2oymJP p7XJhEM6CmXaB4+wlkcsKzghhJA5CE10BMI87SPp8E7KYrck/aCOzl1KjI0CfZLHQT 0up0PPzYUxY0Yqx2/MbyE2mH2jBURHhQwu3LrWWBzozZDanzgw7qM64T8yLNy/jCRC IRG+ySma1JiMj4bsTPINky6a20Gd67hZ8CrgfDDEN0vyWySUWeVGcDpbpr+0u/beJO Ypl6fHeWObeZYkNqj3YhIERa7AK+OqIspgcHaIiZzuevNF4zFL0QwiNED3z33zcVll 2nonIa7HGu1Yg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AA50E6935F for ; Wed, 14 Jan 2026 15:58:13 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tZuJqWPL1rZU for ; Wed, 14 Jan 2026 15:58:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431493; bh=VnXp8ZKuFcOmUS13lCU88Ga+DIpb6vyBDAf3ieguFL4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oLbc76ifT5rKkQLPvtpgumnwuQcFVtXM4RjGj7bLw5Fk6UVCUv8aVqynLHs2oymJP p7XJhEM6CmXaB4+wlkcsKzghhJA5CE10BMI87SPp8E7KYrck/aCOzl1KjI0CfZLHQT 0up0PPzYUxY0Yqx2/MbyE2mH2jBURHhQwu3LrWWBzozZDanzgw7qM64T8yLNy/jCRC IRG+ySma1JiMj4bsTPINky6a20Gd67hZ8CrgfDDEN0vyWySUWeVGcDpbpr+0u/beJO Ypl6fHeWObeZYkNqj3YhIERa7AK+OqIspgcHaIiZzuevNF4zFL0QwiNED3z33zcVll 2nonIa7HGu1Yg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 96B6F69345 for ; Wed, 14 Jan 2026 15:58:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431491; bh=VBj5XgYa2dkDU/CGSxWepeL4VBSfCGq8dgQOpxnPYaA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fvpwMvGz4URjlMKNczRetRNXQh8l0tdKpCbxZiPGUjw4OW516cfEmA/HyJKz2QCha qKZFobZy629XyuDzd8CMDDyvXdvmQmtRWwYhNdjLTybQjUF1sV8G3uQrzJT6takab/ pdMzFZTMOaxTikmLMdMnqRuCk9fwYnneHKNPMZKlSnyDiyrL6FKPGa0PEh0Lppa8I3 O1mD+JS82l3sjWNM9oobXcJH++/PjBtGidT+SbP0lmmn2xWBeCatcEJIkeHNATC5ya aeRGZqKkBUEwwb40/Fnul4i2yVlZiR0GUQ0ns29VxXZXUulxWb+SeL8X2cS5/VFov6 sj+le8V3gGpeQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 79504692E6; Wed, 14 Jan 2026 15:58:11 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id NPYZYC9sQaJD; Wed, 14 Jan 2026 15:58:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431487; bh=ILZMBbioZ9TNmY/+dA6HaQE6BDcoZVMmDMNy1i2hAEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DQE1LvrHjCKMdrmcWCuX4OFNRjwZbOtVxH68KjfJP8Sc9e5s3dcPt/XzTzuq/3bBP UpdrkEfs2n57bnGRoQ5NNr7GyVKZN7UGi/3L0NP2ewGT9tRYpiv5TWseFZBx23NJRr tFgDPG/MBO/guEL3GxOzm+ydBpTaQ2+jGYTV6TS1830GmBPF20U43bYspEA9xE3gvg A8YtPBWJbBsEd9K2lFoMh3wtW5kusnRv5QlvDHlOoz5i8XwndGS3PNogQSg2tLitWS l5x1dyqMX9iB3xwgIa9XdeW0fcfOb/eJbjIqqRIV2N6L7ewekYntZwTTtJv48XG6SH zlHBASAdSCtNQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 344BE692EF; Wed, 14 Jan 2026 15:58:07 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 14 Jan 2026 15:56:08 -0700 Message-ID: <20260114225635.3407989-19-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114225635.3407989-1-sjg@u-boot.org> References: <20260114225635.3407989-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: Z7EILO2NCBF7MW72JM5NSSMMOJWFQ7GS X-Message-ID-Hash: Z7EILO2NCBF7MW72JM5NSSMMOJWFQ7GS X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 18/34] ext4l: Use linux/pagevec.h for folio_batch List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Replace the duplicate struct folio_batch definition and folio_batch_init macro with the existing linux/pagevec.h header which provides the same functionality. This consolidates the folio batch handling into a single location. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 3cc37f65dda..253f09b73f9 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -39,6 +39,7 @@ #include #include /* Real rbtree implementation */ #include /* For timespec64, time64_t */ +#include /* For struct folio_batch */ #include /* For BUILD_BUG_ON */ #include /* For WARN_ON, WARN_ONCE */ #include /* For crc32() used by crc32_be */ @@ -1158,11 +1159,7 @@ struct folio { int _refcount; }; -/* folio_batch - batch of folios */ -struct folio_batch { - unsigned int nr; - struct folio *folios[16]; -}; +/* struct folio_batch is in linux/pagevec.h */ /* folio operations - stubs */ #define folio_mark_dirty(f) do { (void)(f); } while (0) @@ -1182,7 +1179,7 @@ struct folio_batch { #define folio_unlock(f) do { (void)(f); } while (0) /* folio_put and folio_get are implemented in support.c */ #define folio_lock(f) do { (void)(f); } while (0) -#define folio_batch_init(fb) do { (fb)->nr = 0; } while (0) +/* folio_batch_init is in linux/pagevec.h */ #define filemap_get_folios(m, i, e, fb) ({ (void)(m); (void)(i); (void)(e); (void)(fb); 0U; }) /* xa_mark_t - xarray mark type */