| Message ID | 20260108185149.1995917-1-sjg@u-boot.org |
|---|---|
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1767898323; bh=i9ekVwdKYdBb8CedhJZfO62TaxRWUXpC5diSD+/9WII=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=MnxM0bWq73qwoYF7TCa9c40Ybuo3tn1g4TS3C6TndsPtk1RpRjoKcyf0X+L2Ip86i cDJ0mVZ/4L9B0BLtGwrzjMF57Qsw3pSRfr41bd6+emMitpr2RsrMpFZ6WjcBjP74ZU ngdMsivqiF4g4x+dUaA3vJ0dylBggJn8KiL0a/9Z4CyVlDVGNutfyTEur4bzn/07yW DhL2luX9+PfZqallFWc9PLBDNT7rQ0+mKSyPQ2wt/DsrSL9T03YeCOGDMkAOjfWLE5 1dohPyEEVacdG7vYHx+ASqUlOnVmArswf+IjmrBr6T9ZP5z088BA6eMG+elHHNZD1d +Hv+iGP5jiFqQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A2B1B691B3 for <u-boot-concept@u-boot.org>; Thu, 8 Jan 2026 11:52:03 -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 saxvP5xL1pNZ for <u-boot-concept@u-boot.org>; Thu, 8 Jan 2026 11:52:03 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898323; bh=i9ekVwdKYdBb8CedhJZfO62TaxRWUXpC5diSD+/9WII=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=MnxM0bWq73qwoYF7TCa9c40Ybuo3tn1g4TS3C6TndsPtk1RpRjoKcyf0X+L2Ip86i cDJ0mVZ/4L9B0BLtGwrzjMF57Qsw3pSRfr41bd6+emMitpr2RsrMpFZ6WjcBjP74ZU ngdMsivqiF4g4x+dUaA3vJ0dylBggJn8KiL0a/9Z4CyVlDVGNutfyTEur4bzn/07yW DhL2luX9+PfZqallFWc9PLBDNT7rQ0+mKSyPQ2wt/DsrSL9T03YeCOGDMkAOjfWLE5 1dohPyEEVacdG7vYHx+ASqUlOnVmArswf+IjmrBr6T9ZP5z088BA6eMG+elHHNZD1d +Hv+iGP5jiFqQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8CB45691BF for <u-boot-concept@u-boot.org>; Thu, 8 Jan 2026 11:52:03 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898321; bh=0mcaw22MsEEDlf7tWbyHWoO+l04lfU2Lp0VyNvNoczs=; h=From:To:Cc:Subject:Date:From; b=NXeCxyrMrGXzE3IV9lpnz4D1OLSkCj/ebUBi8LL6OHVemTJKery8nQ9i7K1qq8eDS jRuDb6qWZHNqFxDulK+dhcJYOqGUFwq/InIFpBZAJ7PcB6NonyqupuD4/ssxgDf2ED W4U98O9gG9PtKF+w0AgCOPfQJ9s/z6iF2vCpmySvoCm9BiqUNMnR8Y3Mj5NebsLOkj YhIrGKSUsZIpuEdPXuS+oP8EzHK0J/cJ5UQqj3gb7WG7s6bd7X7KelxSZiUIRsTgBy LIsOHGoEbqFp1CQVx2Va+5US/fgRx3Pgohd7J4aRcAklyid2qVPTfi6MjAV54xPw10 9ZPnW2ijt4Jhw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B7F3D691B3; Thu, 8 Jan 2026 11:52:01 -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 hXHJoAkw1HfA; Thu, 8 Jan 2026 11:52:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898317; bh=gAGhrknrUCBcQ1XH12oXV2OiczZQKB9E7406acIcraM=; h=From:To:Cc:Subject:Date:From; b=pUz3VQZMZlbQdHdQda7nyaicK8nHoElomIOm6xJfG6HEs1mV6aGVPUl0q/F2DpjQT zN79Mlg9ZJZ7FxlFWGD71I3XOy7EvpdCVde5YGhOFjKChQKEfnooBbRzx7eFLz4zW3 elmCf2ni/emRlszq7q5VavrRSCQmmpkaTY06wjcGkQvsX8Y4u8KR7ecn8Qtg0vhOQE V+5BW3I1pp6BiWiRbApoLmo/Pd6N7N4jZM2afJRU1hAom/jjlt/iB9FSwvvzJ16fsc JhfErph13C+MX1g2YFu7FJMIX9XweD69IocizPFnleFNWpKzdPkzmUDRP53k7JA5kA LCTVtM5mYRQXQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 58695690FB; Thu, 8 Jan 2026 11:51:57 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Thu, 8 Jan 2026 11:51:15 -0700 Message-ID: <20260108185149.1995917-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: VW2A63UZGYXCBUHOXG3YIHN22QRSWTAG X-Message-ID-Hash: VW2A63UZGYXCBUHOXG3YIHN22QRSWTAG 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: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/21] ext4l: Add Kconfig options to reduce binary size (part P) List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/VW2A63UZGYXCBUHOXG3YIHN22QRSWTAG/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
ext4l: Add Kconfig options to reduce binary size (part P)
|
|
Message
Simon Glass
Jan. 8, 2026, 6:51 p.m. UTC
From: Simon Glass <simon.glass@canonical.com>
This series adds various Kconfig options to the ext4l filesystem driver
to allow disabling optional features and reduce binary size.
New configuration options include:
- CONFIG_EXT4L_DEBUG: Control verbose error messages
- CONFIG_EXT4_FS_POSIX_ACL: POSIX access control lists
- CONFIG_EXT4_FS_SECURITY: Security labels (SELinux, etc.)
- CONFIG_EXT4_MBALLOC: Multiblock allocator
- CONFIG_EXT4_MBALLOC_PREFETCH: Block prefetching
- CONFIG_EXT4_FAST_COMMIT_REPLAY: Fast commit journal replay
- CONFIG_EXT4_MOUNT_OPTS: Mount option parsing
The series also excludes write-related functions from read-only builds
and makes extended attributes and inline-data support optional.
Some tweaks are included to enable ext4l to build on ARM.
Finally, ext4l is enabled on firefly-rk3288 as an example configuration.
Some initial results on code size:
- ext4l is currently 170K larger than ext4 with write-support
- this series reduces the read-only penalty to 91K and with
write-support to 116K
This is still a substantial code-size increase, despite the efforts of
this series. There is definitely more that could be done, but I haven't
seen any more large opportunties yet.
There is still a fair bit of cleanup needed in the stubs, in particular
with the ext4_uboot.h file. I expect there will be at least a few more
series after this one.
Simon Glass (21):
ext4l: Use div64.h instead of defining locally
ext4l: Make use of log.2 instead of defining locally
ext4l: Move __kernel_fsid_t to posix_types.h
ext4l: Use math64.h instead of defining locally
ext4l: Use 64-bit operations for block calculations
ext4l: sandbox: Use volatile in set_bit() etc.
ext4l: Correct type of invalidate_folio()
ext4l: Tie verbose messages to CONFIG_EXT4L_DEBUG
ext4l: Add Kconfig options for optional features
ext4l: Make extended attributes (xattr) optional
ext4l: Add optional inline data and indirect-block support
ext4l: Add a CONFIG_EXT4_MBALLOC_PREFETCH option
ext4l: Add a CONFIG_EXT4_FAST_COMMIT_REPLAY option
ext4l: Add a CONFIG_EXT4_FS_POSIX_ACL option
ext4l: Add a CONFIG_EXT4_FS_SECURITY option
ext4l: Add a CONFIG_EXT4_MBALLOC option
ext4l: Exclude write functions from read-only builds
ext4l: Exclude transaction commits from read-only builds
ext4l: Skip the journal flush in read-only builds
ext4l: Add a CONFIG_EXT4_MOUNT_OPTS option
configs: firefly-rk3288: Enable ext4l filesystem
arch/sandbox/include/asm/bitops.h | 6 +-
arch/sandbox/include/asm/posix_types.h | 4 +
configs/firefly-rk3288_defconfig | 2 +
fs/ext4/Kconfig | 1 +
fs/ext4l/Kconfig | 157 ++++++++++++++++-
fs/ext4l/Makefile | 20 ++-
fs/ext4l/ext4.h | 224 +++++++++++++++++++++++--
fs/ext4l/ext4_uboot.h | 48 +-----
fs/ext4l/fast_commit.c | 4 +
fs/ext4l/file.c | 2 +-
fs/ext4l/interface.c | 11 +-
fs/ext4l/mballoc.c | 5 +-
fs/ext4l/namei.c | 28 ++--
fs/ext4l/stub.c | 21 +--
fs/ext4l/super.c | 94 ++++++++---
fs/ext4l/symlink.c | 6 +-
fs/ext4l/xattr.h | 83 +++++++++
fs/jbd2/checkpoint.c | 4 +
fs/jbd2/journal.c | 17 +-
19 files changed, 605 insertions(+), 132 deletions(-)