From patchwork Tue Dec 16 20:48:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 62 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=1765918132; bh=YNtrx6NHPk4SwSZ4VZ71JRhpDfipradjPuwiq/UhfvE=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=ah6uhHKYukXSiKyHQCrb0gXWrVtuiKY4f348imy0q9Y92HpnjCOVwC1aBgOnOW9nM iYdz9SnBpWltVdwtSnUZW1VMVCCjXzdl3HR0lrGZ4Tnq3El0wZDUQkrBztpiNF85LC rtpiaKmeo+MWk8P+YLUA2RGt/3LIBQyVeIgKVCuKX+K3y0Td1XENVqrWUn67tp0aKT 3Ez6wyzEb9Px2Rg//dndXEWX5RJIOWg9eqpHOQc99dNyp93YEO+WVPjMKap3mjVBON syk6Biq/R9fGmFhqBon7EjM+sX/45/fWKyjduLk1Uy+IdYQy8pZOP+mKxNA2B7wUFm v8pvWFxrkrqiw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 10FF468B69 for ; Tue, 16 Dec 2025 13:48:52 -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 4XYesCdO5fig for ; Tue, 16 Dec 2025 13:48:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765918131; bh=YNtrx6NHPk4SwSZ4VZ71JRhpDfipradjPuwiq/UhfvE=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=ClvVBfPZSiyJ5y9iarJGaS3ylKBF3P+1xNM93ZdVbBeHjHtOq1FhkT1B+Qm74sjVY uNrQcveff8XYOrlCBytB6OndSWyyQ05QXd1u5ZGfq+mYLdmCM31bWXp9svRRk/KVW3 j1zQa/4WTXFJVfFVjIFfgsMB4rh+aj8l+hc+j9dg8k2JbYJHOcJx4MwL1L+KQ233Ga dDzK2qL5Mv9AnXhRDGFvv+gWfm1tNgXT+km7Ve1yktxvtNCDvng545TsgPz+/MYbDa DB/swhyE2RcNeqosxrOF1jJMj3axZwVYkEDhtfKVqZ8racdOBlliJZocOsXVpFQxmi sgK3egKdQOHmw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F271368AF9 for ; Tue, 16 Dec 2025 13:48:51 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765918128; bh=1zOTB+yd1mESPWBathrT/EIUDmGwhzZ/mi/qK422f04=; h=From:To:Cc:Subject:Date:From; b=ZAx+gmTPo8s7TQ1jNsTmOrGaa6wFNzvUTWQTrJOB6MtHvP5XmzpW35kQm2a8dCDFA cBdIi+Gamcrdf9HyfUWQNl6PHsJckfBf/lq9SqjQ/Z6kULg1/vjjeabYRxD2Yc7vcr ByPtg6vcl3C9ndV8MM4dq7EoBzpGvty2EbU4OV/lzTVRxjBav6MD2k0UYRGukLQVsv QzpONWgTnNO+wWInRVXeIzcVN9pkv8yduNd/gzt2j623+gKZUVvSQ/R6AX1dUwKq/q 0YXZus2KhLgbB7Ghikhd6eFBWkv1K/0TnANYLmWP+sq5CxvckOROXHiWalXTLXDUfd mTRkZo5FQlX4g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 811E568AF6; Tue, 16 Dec 2025 13:48:48 -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 AHb3bip9Cu0X; Tue, 16 Dec 2025 13:48:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765918124; bh=F57LHxGb5POuV+15wbx4/MtPBkNGMJ1Z5xdnLC2pWy4=; h=From:To:Cc:Subject:Date:From; b=nxc5MjvIutWhdagXkM3oJSmTrLjg7BHumYowwhBb2jcIXoLMsH7yYpJTicsFwvwH6 OCFqINtgKAXSlXcsS53lU9RcnuLYHhZwF5hHLfi3YdgxifhqLLM3pjAnsiDUmNwxzx qkmgWuqKVC1rzecKZGk3xzoaFsFTicmCtEUCYaulEj04EX/jh2D1wRUx2dSiwwpYVU M8ccMD1j2vSK/XNPpnzi7+YkIumYDwg61HS/f89oasLFYzd/rNp5+gHGdY1aG2NL0p MaxwxO2iUa5WtCxBW6gHcGg1aPCVGhmppeTJhT5bwcC2pI1ToMGYtHw2l0+skP0ijH DopzVXc+3COwg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1214468ABD; Tue, 16 Dec 2025 13:48:44 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 16 Dec 2025 13:48:05 -0700 Message-ID: <20251216204828.4007984-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: EOPUFQH6WBSAEKSMYKDUINITMDLWJ7ZC X-Message-ID-Hash: EOPUFQH6WBSAEKSMYKDUINITMDLWJ7ZC 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/17] ext4l: Begin an implementation of ext4 based on Linux 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 U-Boot has long had a solid implementation of ext4. Support for writing and basic journaling was added as well. However, there are some missing features. For example, some distros enable metadata checksums which are not supported. There also also other features such as fast commit and special feature for small files which are not currently available. Linux has the canonical implementation of ext4, so one approach would be to plumb that code into U-Boot. It is not a small undertaking, since the existing linux/compat.h has only a small fraction of the required features. As a start towards this effort, bring in the entire Linux code, unmodified. Note: There are 1000s of checkpatch checks and warnings, plus over 100 errors. These have been left along to reduce the source delta. Simon Glass (17): ext4l: bring in extents.c ext4l: bring in inode.c ext4l: bring in mballoc.c ext4l: bring in namei.c ext4l: bring in super.c ext4l: bring in ext4.h ext4l: bring in files a-d ext4l: bring in extents_status, fsync, and hash ext4l: bring in ext4_jbd2 and fast_commit ext4l: bring in file, fsmap, and ialloc ext4l: bring in indirect and inline ext4l: bring in inode-test, ioctl, and mballoc headers ext4l: bring in migrate, mmp, move_extent, orphan, and page-io ext4l: bring in resize, symlink, sysfs, truncate, verity, and readpage ext4l: bring in xattr files ext4l: bring in Kconfig and Makefile ext4l: bring in jbd2 header file fs/ext4l/Kconfig | 92 + fs/ext4l/Makefile | 20 + fs/ext4l/acl.c | 304 ++ fs/ext4l/acl.h | 74 + fs/ext4l/balloc.c | 1003 +++++ fs/ext4l/bitmap.c | 99 + fs/ext4l/block_validity.c | 370 ++ fs/ext4l/crypto.c | 241 ++ fs/ext4l/dir.c | 693 ++++ fs/ext4l/ext4.h | 3932 +++++++++++++++++++ fs/ext4l/ext4_extents.h | 268 ++ fs/ext4l/ext4_jbd2.c | 408 ++ fs/ext4l/ext4_jbd2.h | 461 +++ fs/ext4l/extents.c | 6189 ++++++++++++++++++++++++++++++ fs/ext4l/extents_status.c | 2306 ++++++++++++ fs/ext4l/extents_status.h | 254 ++ fs/ext4l/fast_commit.c | 2343 ++++++++++++ fs/ext4l/fast_commit.h | 186 + fs/ext4l/file.c | 995 +++++ fs/ext4l/fsmap.c | 792 ++++ fs/ext4l/fsmap.h | 56 + fs/ext4l/fsync.c | 177 + fs/ext4l/hash.c | 323 ++ fs/ext4l/ialloc.c | 1621 ++++++++ fs/ext4l/indirect.c | 1474 ++++++++ fs/ext4l/inline.c | 1982 ++++++++++ fs/ext4l/inode-test.c | 283 ++ fs/ext4l/inode.c | 6756 +++++++++++++++++++++++++++++++++ fs/ext4l/ioctl.c | 2020 ++++++++++ fs/ext4l/mballoc-test.c | 999 +++++ fs/ext4l/mballoc.c | 7175 +++++++++++++++++++++++++++++++++++ fs/ext4l/mballoc.h | 273 ++ fs/ext4l/migrate.c | 672 ++++ fs/ext4l/mmp.c | 408 ++ fs/ext4l/move_extent.c | 706 ++++ fs/ext4l/namei.c | 4241 +++++++++++++++++++++ fs/ext4l/orphan.c | 659 ++++ fs/ext4l/page-io.c | 593 +++ fs/ext4l/readpage.c | 422 +++ fs/ext4l/resize.c | 2193 +++++++++++ fs/ext4l/super.c | 7516 +++++++++++++++++++++++++++++++++++++ fs/ext4l/symlink.c | 136 + fs/ext4l/sysfs.c | 648 ++++ fs/ext4l/truncate.h | 52 + fs/ext4l/verity.c | 399 ++ fs/ext4l/xattr.c | 3225 ++++++++++++++++ fs/ext4l/xattr.h | 236 ++ fs/ext4l/xattr_hurd.c | 52 + fs/ext4l/xattr_security.c | 66 + fs/ext4l/xattr_trusted.c | 47 + fs/ext4l/xattr_user.c | 50 + include/linux/jbd2.h | 1815 +++++++++ 52 files changed, 68305 insertions(+) create mode 100644 fs/ext4l/Kconfig create mode 100644 fs/ext4l/Makefile create mode 100644 fs/ext4l/acl.c create mode 100644 fs/ext4l/acl.h create mode 100644 fs/ext4l/balloc.c create mode 100644 fs/ext4l/bitmap.c create mode 100644 fs/ext4l/block_validity.c create mode 100644 fs/ext4l/crypto.c create mode 100644 fs/ext4l/dir.c create mode 100644 fs/ext4l/ext4.h create mode 100644 fs/ext4l/ext4_extents.h create mode 100644 fs/ext4l/ext4_jbd2.c create mode 100644 fs/ext4l/ext4_jbd2.h create mode 100644 fs/ext4l/extents.c create mode 100644 fs/ext4l/extents_status.c create mode 100644 fs/ext4l/extents_status.h create mode 100644 fs/ext4l/fast_commit.c create mode 100644 fs/ext4l/fast_commit.h create mode 100644 fs/ext4l/file.c create mode 100644 fs/ext4l/fsmap.c create mode 100644 fs/ext4l/fsmap.h create mode 100644 fs/ext4l/fsync.c create mode 100644 fs/ext4l/hash.c create mode 100644 fs/ext4l/ialloc.c create mode 100644 fs/ext4l/indirect.c create mode 100644 fs/ext4l/inline.c create mode 100644 fs/ext4l/inode-test.c create mode 100644 fs/ext4l/inode.c create mode 100644 fs/ext4l/ioctl.c create mode 100644 fs/ext4l/mballoc-test.c create mode 100644 fs/ext4l/mballoc.c create mode 100644 fs/ext4l/mballoc.h create mode 100644 fs/ext4l/migrate.c create mode 100644 fs/ext4l/mmp.c create mode 100644 fs/ext4l/move_extent.c create mode 100644 fs/ext4l/namei.c create mode 100644 fs/ext4l/orphan.c create mode 100644 fs/ext4l/page-io.c create mode 100644 fs/ext4l/readpage.c create mode 100644 fs/ext4l/resize.c create mode 100644 fs/ext4l/super.c create mode 100644 fs/ext4l/symlink.c create mode 100644 fs/ext4l/sysfs.c create mode 100644 fs/ext4l/truncate.h create mode 100644 fs/ext4l/verity.c create mode 100644 fs/ext4l/xattr.c create mode 100644 fs/ext4l/xattr.h create mode 100644 fs/ext4l/xattr_hurd.c create mode 100644 fs/ext4l/xattr_security.c create mode 100644 fs/ext4l/xattr_trusted.c create mode 100644 fs/ext4l/xattr_user.c create mode 100644 include/linux/jbd2.h