From patchwork Tue Dec 16 20:48:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 915 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=1765918199; bh=TORkDIwrQMweCnGgD9XIi7EeOQJx/WJKFWTpJdfmZSQ=; 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=LE/XOv7Z/wn6VmSWLDC8UHOYWh/0BmxgmwThwCmmCBRjSwyuKyl4EFvDsKvAOeBKg DTuXpPXHe0ILC/j005lf8JH0HSmpWkiC+A6zZeGHYsLypY5qaKaBzox3iQksB+52UX tKZorAhgeYbQ8K0npN9pQv8Vb1k+19LB9fOpQFa0N1t3J3GHsE8BHO0ELh08Fot6r1 AeOa4V5s6z7pYF65ueQfvpKb8aoRT02kAu4l9BRqbaUY8z26hm7WdzggDRcSa1lipO dZ3zi12ixeKy8Dizq0XNy/QjizN4hdTV2Q+MHoBm3q9b73WodK9VWt3+rHcvoDwSOC QILy9VxyWQf1A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 95BE868B91 for ; Tue, 16 Dec 2025 13:49:59 -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 gPPBmszn3hTx for ; Tue, 16 Dec 2025 13:49:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765918199; bh=TORkDIwrQMweCnGgD9XIi7EeOQJx/WJKFWTpJdfmZSQ=; 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=LE/XOv7Z/wn6VmSWLDC8UHOYWh/0BmxgmwThwCmmCBRjSwyuKyl4EFvDsKvAOeBKg DTuXpPXHe0ILC/j005lf8JH0HSmpWkiC+A6zZeGHYsLypY5qaKaBzox3iQksB+52UX tKZorAhgeYbQ8K0npN9pQv8Vb1k+19LB9fOpQFa0N1t3J3GHsE8BHO0ELh08Fot6r1 AeOa4V5s6z7pYF65ueQfvpKb8aoRT02kAu4l9BRqbaUY8z26hm7WdzggDRcSa1lipO dZ3zi12ixeKy8Dizq0XNy/QjizN4hdTV2Q+MHoBm3q9b73WodK9VWt3+rHcvoDwSOC QILy9VxyWQf1A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8609368B6C for ; Tue, 16 Dec 2025 13:49:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765918197; bh=5Tl8HFMlFwjX4+F/tUtDIHBqknc6REEEU707804voNo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PkMPyVfRJaSGS5KiJT2amyZl+q0L2ATyI7Mkonsswt/Dyn9c3dTRtz63og0I2IeAp fH2rg4QWNLikCzcMcFOC8GdvIIiL7Ikhex3BQciuWPx7dU0HtvV85s8qKQrG3Ek/o1 andXLvyjlJ0aHN3CLVRhXMDIr3LXD++ju3u9GDXL/fuAsZIqriavArHGOxlmKGPlXo GcNCqIEUTIDDJalqfMn3t7XOwC9Fs8r6Yg8PnIhcuk1+2QAd/KXXpc3tiYvHdxBfV0 irAYE20Nau9IJm3pwY5BeK0NCYhOaoY2oeJzV+w8bz2KN8qz3Syt0I2/1vZ5S7VeEQ WzOALinJ+GN7w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CD501689D3; Tue, 16 Dec 2025 13:49:57 -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 jkLNdkoHVKa4; Tue, 16 Dec 2025 13:49:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765918193; bh=jTa43q0ONYtfwP88sN9SddF1JxZJiaxWILdPC8QlFks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SBgCAUw0YL91vTbqoOn/dnEfZx3zOjdcd3KtKFeE/iUSk1Lg0f+lqG/N09k4pI5UU uA26UPO7RTCXlCmn+ErWO0zDqiC5V0qkkSoh6vtv5wuE8TzCgoZ3wJNm+kYsVr1e4f CXI4WPJQkQzOnVrgTVVUrq4/wJfoCxDxZWYQRoY1WLZ8u0pUbvqWsxBkeoCtBaLFa0 2L5GuOBpRnFaOaGuVEMnYk4G8QnJ7utucxKW4XIjjgpVEukXUB9RRuNPNF5OFtl8WO dJiPHu/QtO4mn/ZnNAvfaxKM9SLV3i4xTPh736YFwjaEmgxivdMPB80Yin2efQezJu sacUXB+rwZHPg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 4725A68AEE; Tue, 16 Dec 2025 13:49:53 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 16 Dec 2025 13:48:21 -0700 Message-ID: <20251216204828.4007984-17-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251216204828.4007984-1-sjg@u-boot.org> References: <20251216204828.4007984-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: EXIA6WH2KILVMOOUQNODSBVQUF4XSEPI X-Message-ID-Hash: EXIA6WH2KILVMOOUQNODSBVQUF4XSEPI 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 16/17] ext4l: bring in Kconfig and Makefile 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 Copy Kconfig and Makefile from Linux v6.18 fs/ext4 directory. - Kconfig: configuration options for ext4 - Makefile: build rules Co-developed-by: Claude Opus 4.5 --- fs/ext4l/Kconfig | 92 +++++++++++++++++++++++++++++++++++++++++++++++ fs/ext4l/Makefile | 20 +++++++++++ 2 files changed, 112 insertions(+) create mode 100644 fs/ext4l/Kconfig create mode 100644 fs/ext4l/Makefile diff --git a/fs/ext4l/Kconfig b/fs/ext4l/Kconfig new file mode 100644 index 00000000000..01873c2a34a --- /dev/null +++ b/fs/ext4l/Kconfig @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: GPL-2.0-only +config EXT4_FS + tristate "The Extended 4 (ext4) filesystem" + select BUFFER_HEAD + select JBD2 + select CRC16 + select CRC32 + select FS_IOMAP + select FS_ENCRYPTION_ALGS if FS_ENCRYPTION + help + This is the next generation of the ext3 filesystem. + + Unlike the change from ext2 filesystem to ext3 filesystem, + the on-disk format of ext4 is not forwards compatible with + ext3; it is based on extent maps and it supports 48-bit + physical block numbers. The ext4 filesystem also supports delayed + allocation, persistent preallocation, high resolution time stamps, + and a number of other features to improve performance and speed + up fsck time. For more information, please see the web pages at + http://ext4.wiki.kernel.org. + + The ext4 filesystem supports mounting an ext3 filesystem; while there + are some performance gains from the delayed allocation and inode + table readahead, the best performance gains require enabling ext4 + features in the filesystem using tune2fs, or formatting a new + filesystem as an ext4 filesystem initially. Without explicit enabling + of ext4 features, the on disk filesystem format stays fully backward + compatible. + + To compile this file system support as a module, choose M here. The + module will be called ext4. + + If unsure, say N. + +config EXT4_USE_FOR_EXT2 + bool "Use ext4 for ext2 file systems" + depends on EXT4_FS + depends on EXT2_FS=n + default y + help + Allow the ext4 file system driver code to be used for ext2 + file system mounts. This allows users to reduce their + compiled kernel size by using one file system driver for + ext2, ext3, and ext4 file systems. + +config EXT4_FS_POSIX_ACL + bool "Ext4 POSIX Access Control Lists" + depends on EXT4_FS + select FS_POSIX_ACL + help + POSIX Access Control Lists (ACLs) support permissions for users and + groups beyond the owner/group/world scheme. + + If you don't know what Access Control Lists are, say N + +config EXT4_FS_SECURITY + bool "Ext4 Security Labels" + depends on EXT4_FS + help + Security labels support alternative access control models + implemented by security modules like SELinux. This option + enables an extended attribute handler for file security + labels in the ext4 filesystem. + + If you are not using a security module that requires using + extended attributes for file security labels, say N. + +config EXT4_DEBUG + bool "Ext4 debugging support" + depends on EXT4_FS + help + Enables run-time debugging support for the ext4 filesystem. + + If you select Y here, then you will be able to turn on debugging + using dynamic debug control for mb_debug() / ext_debug() msgs. + +config EXT4_KUNIT_TESTS + tristate "KUnit tests for ext4" if !KUNIT_ALL_TESTS + depends on EXT4_FS && KUNIT + default KUNIT_ALL_TESTS + help + This builds the ext4 KUnit tests. + + KUnit tests run during boot and output the results to the debug log + in TAP format (https://testanything.org/). Only useful for kernel devs + running KUnit test harness and are not for inclusion into a production + build. + + For more information on KUnit and unit tests in general please refer + to the KUnit documentation in Documentation/dev-tools/kunit/. + + If unsure, say N. diff --git a/fs/ext4l/Makefile b/fs/ext4l/Makefile new file mode 100644 index 00000000000..72206a29267 --- /dev/null +++ b/fs/ext4l/Makefile @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for the linux ext4-filesystem routines. +# + +obj-$(CONFIG_EXT4_FS) += ext4.o + +ext4-y := balloc.o bitmap.o block_validity.o dir.o ext4_jbd2.o extents.o \ + extents_status.o file.o fsmap.o fsync.o hash.o ialloc.o \ + indirect.o inline.o inode.o ioctl.o mballoc.o migrate.o \ + mmp.o move_extent.o namei.o page-io.o readpage.o resize.o \ + super.o symlink.o sysfs.o xattr.o xattr_hurd.o xattr_trusted.o \ + xattr_user.o fast_commit.o orphan.o + +ext4-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o +ext4-$(CONFIG_EXT4_FS_SECURITY) += xattr_security.o +ext4-inode-test-objs += inode-test.o +obj-$(CONFIG_EXT4_KUNIT_TESTS) += ext4-inode-test.o +ext4-$(CONFIG_FS_VERITY) += verity.o +ext4-$(CONFIG_FS_ENCRYPTION) += crypto.o