From patchwork Tue Dec 30 23:41:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 81 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=1767138265; bh=WvT7e2NzcUeGYlSIoeXZ840Hf3g8XRjtqql1zhng8Xo=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=oW7hWPpSPQ4dok+bfnUfdZDsBt6la2XBAaIEMPrjuZiOFm67QeEcCp/V9P5Xy0mcV 1a347Dz8aAoS4Z4tY18Izg5nWb/r+fpgnEzF4vfRBe2uZO61XIVP819Ofv5ulEuvMc NLB4SK4BAFIyDQy58Sh4gOuvnXSX3veIYh/a3nIz86eGyiuodeutjVsTFgwcNN4YNX pber0mY7zuJh8uBGlpqaAOZ2ggXTWNbP0QphF1ft1Zy1Jy5DMzvztgv/20yVWz+IRw olotC6YbkD1NNAseW6Z5HEK9icrJEXvvDNzGHQEJCEa7tSnmSxvP/TQ9QJhU6SkSu3 OZuToKqPlrkEA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 63B2268F71 for ; Tue, 30 Dec 2025 16:44:25 -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 Bxe9qHM0pe-A for ; Tue, 30 Dec 2025 16:44:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138265; bh=WvT7e2NzcUeGYlSIoeXZ840Hf3g8XRjtqql1zhng8Xo=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=oW7hWPpSPQ4dok+bfnUfdZDsBt6la2XBAaIEMPrjuZiOFm67QeEcCp/V9P5Xy0mcV 1a347Dz8aAoS4Z4tY18Izg5nWb/r+fpgnEzF4vfRBe2uZO61XIVP819Ofv5ulEuvMc NLB4SK4BAFIyDQy58Sh4gOuvnXSX3veIYh/a3nIz86eGyiuodeutjVsTFgwcNN4YNX pber0mY7zuJh8uBGlpqaAOZ2ggXTWNbP0QphF1ft1Zy1Jy5DMzvztgv/20yVWz+IRw olotC6YbkD1NNAseW6Z5HEK9icrJEXvvDNzGHQEJCEa7tSnmSxvP/TQ9QJhU6SkSu3 OZuToKqPlrkEA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 51BD768C0F for ; Tue, 30 Dec 2025 16:44:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138262; bh=zgeL694i+h60VzM/bAeoFYpDuK30ZISX/xYN6enw5sw=; h=From:To:Cc:Subject:Date:From; b=K8auAmUD8p5RAeCJkgo5iNO8ivSBiW9T8f/80kFcAeR0dBnlAO5xk0slX98FqTiqf U/6f8VDgknoL4ipyzTgjfIyBsVPzgM00Rnp09TJDyRAiio8XqnxYzZHukdp/b1k0gU OvWKai1zFQIqFnX5g3Yr5eaD3a/xtju+s10SP7f/uiRnQurGSIKgUb9PzYhp7O7Wok YOiaEQ9XdDQTX+MLTb/U2bGMwcLRtysW8zW0LflyhVGiMLomMA3M1xk5jVSGl7eaTV MZjlbRMDPb1igx0eCqC9pbSqjNrgaPaJOIMyU83UmkwTf9A1l82fwFLVfX1feCjaAX sIG2X+bh0vFtw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3611168C57; Tue, 30 Dec 2025 16:44:22 -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 8l_vC1R_M0Eu; Tue, 30 Dec 2025 16:44:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138258; bh=zOf5Gpcs8jDThdJ/F4ufaIPErPxWvsbmK/hNVoH5a98=; h=From:To:Cc:Subject:Date:From; b=wToE5oUbL8y+HKCmlImvYWIQv24yWswb3ZJ1pNhnB0OD071D9I40xiCgj67B1iujv 9o3xjiHtyvasrH9bdBSZB0+gmkzPbY8+sKFWyDSSz9/L1b/x99D9aKigq1RUcnuZvy 2xmz5w3Hgmur7j36jo0q/kzNKdlvp3QibK7t4nki2AwXKK8uKAL0hTOScdISYJzWuV Zm304i2lXlAdvPCL8L9J6i4XO3q5f5QHGWavidkDMBNiGo58H5Rsc5ZKXP96u9VeAN lOOjBsH2ieYInXsO6BHPIilgmaSUlfGVN7EpDBOOABjMnAYwiwi+eR7RpAeOYW0IYi zaj5J+t+qrELg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id EBAB864E2A; Tue, 30 Dec 2025 16:44:17 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 30 Dec 2025 16:41:12 -0700 Message-ID: <20251230234134.906477-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: KCIW4LRUQOE7QZGJ6WS53D4Q6Q3UJCMQ X-Message-ID-Hash: KCIW4LRUQOE7QZGJ6WS53D4Q6Q3UJCMQ 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/15] ext4l: Infrastructure and fixes for write support (part K) 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 This series adds infrastructure and bug fixes needed for ext4l write support. It includes: - kmem_cache implementation controlled by CONFIG_LIB_KMEM_CACHE - Bit operation functions imported from Linux (find_bit, fns) - Little-endian bit operations for ext4 bitmaps - Buffer I/O infrastructure for write operations - Folio and buffer head fixes for U-Boot's malloc'd buffers - Inode handling fixes (i_mode, i_blocks, iput eviction) - Journal cleanup detection in bh_cache_clear() - Various bug fixes for clang warnings and multi-word bit operations Simon Glass (15): lib: Add CONFIG_LIB_KMEM_CACHE for full kmem_cache support ext4l: Add journal_head detection in bh_cache_clear bitops: linux: Add fns() to find N'th set bit lib: linux: Add find_bit from Linux ext4l: Implement little-endian bit operations ext4l: Adjust folio offset and mapping operations ext4l: Implement buffer write I/O and allocation ext4l: Fix inode_init_owner to set i_mode ext4l: Add ext4_commit_super() declaration ext4l: Fix dquot functions to update i_blocks ext4l: Return boot-relative time from ktime_get_real_seconds() ext4l: Implement iput() to evict deleted inodes ext4l: Use percpu_counter initialized field ext4l: Fix bit operations for bits beyond first word ext4l: Fix cmpxchg macro warning with clang fs/ext4l/ext4_uboot.h | 95 +++++++++------- fs/ext4l/stub.c | 47 +++++++- fs/ext4l/support.c | 246 ++++++++++++++++++++++++++++++++++++++--- include/linux/bitops.h | 13 +++ include/linux/find.h | 176 +++++++++++++++++++++++++++++ include/linux/slab.h | 27 +++-- lib/Kconfig | 8 ++ lib/Makefile | 2 + lib/find_bit.c | 142 ++++++++++++++++++++++++ lib/kmem_cache.c | 20 ++++ 10 files changed, 704 insertions(+), 72 deletions(-) create mode 100644 include/linux/find.h create mode 100644 lib/find_bit.c create mode 100644 lib/kmem_cache.c