[Concept,00/14] ext4l: Linux adaptation patches for ext4 write support

Message ID 20251230205157.3383926-1-sjg@u-boot.org
Headers
Series ext4l: Linux adaptation patches for ext4 write support |

Message

Simon Glass Dec. 30, 2025, 8:51 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

This series contains adaptations to Linux-imported files needed for
ext4l write support in U-Boot. These changes are separated from the
main ext4l implementation to make it easier to track modifications
to imported code.

The patches include:
- Bit position fixes for REQ_OP and BH_OwnsData to avoid conflicts
- JBD2 journal adaptations for U-Boot's single-threaded environment
- Function exports to allow calling ext4 internals from U-Boot code
- Cache management fixes for multiple mount/unmount cycles
- Compiler warning fixes for Clang compatibility

These changes are minimal modifications to the Linux ext4 and jbd2
code, using #ifdef __UBOOT__ guards where appropriate to ease future
Linux updates.


Simon Glass (14):
  linux: ext4l: Fix REQ_OP and BH_OwnsData bit positions
  linux: jbd2: Add synchronous commit on transaction stop
  linux: ext4l: Export ext4 functions for U-Boot interface
  linux: ext4l: Skip orphan handling in U-Boot
  linux: fs: Add folio cache to address_space
  linux: percpu_counter: Add initialized field
  linux: ext4l: Mark journaled metadata buffers dirty for bh_cache_sync
  linux: jbd2: Add validation in jbd2_journal_write_metadata_buffer
  linux: jbd2: Add jbd2_journal_exit_global for clean shutdown
  linux: slab: Convert kmem_cache functions to declarations
  linux: ext4l: Mark ext4_groupinfo_slab_names unused
  linux: ext4l: Export ext4_commit_super function
  linux: ext4l: Make cache init/exit functions reentrant for U-Boot
  linux: ext4l: Initialize len in ext4_ext_find_hole

 fs/ext4l/block_validity.c      | 10 ++++++
 fs/ext4l/ext4.h                |  9 ++++++
 fs/ext4l/ext4_jbd2.c           |  8 +++++
 fs/ext4l/ext4_uboot.h          | 17 +++++++---
 fs/ext4l/extents.c             |  2 +-
 fs/ext4l/extents_status.c      |  6 ++++
 fs/ext4l/mballoc.c             | 15 ++++++++-
 fs/ext4l/namei.c               | 18 +++++------
 fs/ext4l/orphan.c              |  9 ++++++
 fs/ext4l/super.c               |  3 +-
 fs/ext4l/support.c             |  2 +-
 fs/jbd2/journal.c              | 57 +++++++++++++++++++++++++++++++++-
 fs/jbd2/transaction.c          | 18 +++++++++++
 include/linux/buffer_head.h    |  2 --
 include/linux/fs.h             | 10 ++++++
 include/linux/jbd2.h           |  1 +
 include/linux/percpu_counter.h |  4 ++-
 include/linux/slab.h           | 15 ++-------
 18 files changed, 172 insertions(+), 34 deletions(-)