| Message ID | 20251231223008.3251711-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=1767220228; bh=Mm9erJAB9UXdhEcOgx/z0fJfXb7LBYJL6jm3UTgvC4g=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=AqYu5iQLWiHqAyKbG7w+MkTVnfvBtbJ+N63JCvEWXdbZSfmlv7x/YyjuRpdWchqvJ n0f8+T6xkdqQTL00IG+Ox7525V01UE/bJDNDx4wPfh1KdWLiUlvm2qt1EKpR+i2bEv ysPWBLCMjciiBFb731Qgo/4+RCsu5kUyGjDxXHYuumxiMqiUElXbHXPeC1pDwaErnu HaWL9R4a7oCQC6RvPdvaGR2yo8jzT9LmAG/UL1GWP7BruLK2KS4iajlXAgiGk34hVL yXY8o2xni7Md7nlpG2CvXYmil7SilnG5Nwc0BfRIoo6duocaGdDHtssyFu1H8n0hGp wbcmpffpEFaZQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1F4DF68FC2 for <u-boot-concept@u-boot.org>; Wed, 31 Dec 2025 15:30:28 -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 c-MeUL7Y0xNs for <u-boot-concept@u-boot.org>; Wed, 31 Dec 2025 15:30:28 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767220228; bh=Mm9erJAB9UXdhEcOgx/z0fJfXb7LBYJL6jm3UTgvC4g=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=AqYu5iQLWiHqAyKbG7w+MkTVnfvBtbJ+N63JCvEWXdbZSfmlv7x/YyjuRpdWchqvJ n0f8+T6xkdqQTL00IG+Ox7525V01UE/bJDNDx4wPfh1KdWLiUlvm2qt1EKpR+i2bEv ysPWBLCMjciiBFb731Qgo/4+RCsu5kUyGjDxXHYuumxiMqiUElXbHXPeC1pDwaErnu HaWL9R4a7oCQC6RvPdvaGR2yo8jzT9LmAG/UL1GWP7BruLK2KS4iajlXAgiGk34hVL yXY8o2xni7Md7nlpG2CvXYmil7SilnG5Nwc0BfRIoo6duocaGdDHtssyFu1H8n0hGp wbcmpffpEFaZQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0DCF768F65 for <u-boot-concept@u-boot.org>; Wed, 31 Dec 2025 15:30:28 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767220225; bh=3nduFpwjmdMyQ58gU9r9G9U7b+6J+puLHdFbM5FwJek=; h=From:To:Cc:Subject:Date:From; b=MsWDCpM5fxdHcXnUJXN1W2Che7ZQOwUh9dAhF/9bLvxrE9r9b1c5tAVrpp4oQCwRp CHJjLqxR337UkQRfQ8lVU3vmZHGr+y+IJtAWXB048LUNJxJTp3Y+MoIcG2Spo5M8wh oXCYkmsL7sUX98WkKwEBeFNalVqqcr5eyHq7yUl4ZYoVbS1zY/LQkTJvNAAp4KN4DT sugxDrJFZ+1mAYymJxI2Um5uaxgATQENHolgPC6no9tF+g3H7L0fCCwCy6t2tMNZZn ZT7dCEbKG6gzMXySAcnBXr/OhXP8YY9kMbKcLqbB12g5esBHjINEpTERruD7gP9SEp I3u3tjpVHTVtQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8345468F65; Wed, 31 Dec 2025 15:30: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 10026) with ESMTP id CS96RIn5OihS; Wed, 31 Dec 2025 15:30:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767220221; bh=5Dakde1WVSK0tlHZeg7DB7jLPnweTkDB+jRjm2XsALY=; h=From:To:Cc:Subject:Date:From; b=u0cVPuu/RkEmgNg8gdGm2N/3pxZtq/w94dKsXg+VSwg/npM0IaqpyaBHLYHVe8wZ8 00S6l5miw7U06oVm3Teos4JDBbH5PuBeRQg8rimQf8LOs/9WSIj/g87W9xduSwYPPr Y40xJKm5WENM28SelNn49JSZy5o/kV7pTZYh2UKrWHhA/Ixb54dFeAf9vfyYW/iQxz AAJMifeHVGoEVDVbuqHRnGAemBLiluErwDGnvTyRc7PB+4q27BJDc3VdtOpdKOCd8E kMW39ZuYaPCcPJqkWkTjfwCDojFoqXPQSTJQY3bj+bl3BoC8sFj5Udh7eTjaDUnVtY zNCyrBhstmbJg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id DC6D368C5D; Wed, 31 Dec 2025 15:30:20 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 31 Dec 2025 15:29:33 -0700 Message-ID: <20251231223008.3251711-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: WPT36KH7U5VTF3ZPOWOMQHZKA32MDQJB X-Message-ID-Hash: WPT36KH7U5VTF3ZPOWOMQHZKA32MDQJB 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/26] ext4l: Add write support (part L) 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/WPT36KH7U5VTF3ZPOWOMQHZKA32MDQJB/> 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 write support (part L)
|
|
Message
Simon Glass
Dec. 31, 2025, 10:29 p.m. UTC
From: Simon Glass <simon.glass@canonical.com>
This series adds write support to the new ext4l filesystem driver,
supporting file creation, modification, and deletion.
The main additions are:
- File write with journalling support
- File deletion (unlink)
- Directory creation (mkdir)
- Symbolic link creation (ln)
- File and directory rename
Infrastructure improvements include proper cleanup of journal references
when unmounting, safeguards to handle probe without explicit close, and
prevention of use-after-free issues with buffer_heads that have active
journal_heads.
The series also enables ext4l for sandbox testing and allows the use of
metadata_csum checksums which the existing ext4 driver does not support.
Some other tweaks are included:
- a fix for mcheck to avoid filling up pre-relocation malloc()
- use the correct logo for readthedocs
- add a flag to avoid using the video console in tests
- a fallback option for finding persistent data-dir
At this point ext4l is useable, but there is more work needed,
including:
- Add MAINTAINERS entry
- Add more Kconfig options for various features (to reduce code size)
- Enable for ARM and x86 targets
- Documentation
- Tests for failure cases (to check that the journal is doing its job)
Simon Glass (26):
sandbox: os: Check executable directory for persistent files
sandbox: Add --quiet_vidconsole option to speed up output
doc: Correct the U-Boot logo
blkmap: Handle read-only slices in write path
mcheck: Add Kconfig option for caller string length
mcheck: Skip mcheck overhead for pre-relocation allocations
Revert "lib: Add CONFIG_LIB_KMEM_CACHE for full kmem_cache support"
ext4l: Move message buffer functions to support.c
ext4l: Add inode-tracking lists
ext4l: Fix a few problems with handling bh_cache
ext4l: Clean up fully when unmounting
ext4l: Remove duplicate atomic_add declarations
ext4l: Use the real crc16 implementation
ext4l: Add a few Kconfig dependencies
ext4l: Add bh_cache_release_jbd() to clean up journal references
ext4l: Add safeguard to close previous mount in probe
ext4l: Prevent freeing buffer_heads with active journal_heads
ext4l: Add support for read-only devices
ext4l: Add write support
ext4l: Add unlink support for file deletion
ext4l: Add mkdir support for directory creation
ext4l: Add symlink support
ext4l: Update symlink to replace existing files
ext4l: Add rename support
test: fs_helper: Keep metadata_csum enabled for ext4l
sandbox: Enable CONFIG_FS_EXT4L
Kconfig | 11 +
arch/sandbox/cpu/os.c | 27 +-
arch/sandbox/cpu/start.c | 10 +
arch/sandbox/include/asm/state.h | 1 +
board/sandbox/sandbox.c | 16 +
common/dlmalloc.c | 33 +-
common/mcheck_core.inc.h | 5 +-
configs/sandbox_defconfig | 2 +
doc/arch/sandbox/sandbox.rst | 7 +
doc/conf.py | 2 +-
drivers/block/blkmap.c | 3 +
fs/ext4l/Kconfig | 3 +
fs/ext4l/ext4.h | 6 +
fs/ext4l/ext4_uboot.h | 32 +-
fs/ext4l/interface.c | 679 ++++++++++++++++++++++++++--
fs/ext4l/stub.c | 8 +-
fs/ext4l/super.c | 25 +-
fs/ext4l/support.c | 130 +++++-
fs/fs_legacy.c | 10 +-
include/ext4l.h | 67 +++
include/linux/fs.h | 1 +
include/linux/slab.h | 27 +-
lib/Kconfig | 8 -
lib/Makefile | 1 -
lib/kmem_cache.c | 20 -
test/fs/ext4l.c | 251 ++++++++++
test/py/tests/fs_helper.py | 13 +-
test/py/tests/test_event_dump.py | 1 +
test/py/tests/test_fs/test_ext4l.py | 25 +
tools/logos/u-boot-logo-text.svg | Bin 0 -> 8552 bytes
30 files changed, 1287 insertions(+), 137 deletions(-)
delete mode 100644 lib/kmem_cache.c
create mode 100644 tools/logos/u-boot-logo-text.svg