[Concept,00/33] Reorganise ext4l compatibility stubs

Message ID 20260121220857.2137568-1-sjg@u-boot.org
Headers
Series Reorganise ext4l compatibility stubs |

Message

Simon Glass Jan. 21, 2026, 10:08 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

The ext4l filesystem uses a large compatibility header (ext4_uboot.h)
containing stubs for Linux kernel interfaces. This series moves these
stubs to their proper locations in include/linux/, making them available
to other subsystems and improving code organisation.

The series:
- Fixes list_sort() callback signature to match Linux kernel
- Moves struct definitions and stubs to appropriate linux/ headers
- Adds missing stubs to existing headers (fs.h, blkdev.h, slab.h, etc.)
- Creates new stub headers where needed (iomap.h, super_types.h)
- Consolidates and sorts the remaining includes

This reduces ext4_uboot.h from over 550 lines to around 270 lines. At
this point, the work can be considered complete.


Simon Glass (33):
  linux/sort.h: Fix qsort implicit declaration warning
  list: Add const qualifiers to list_sort callback signature
  ext4l: Remove redundant header-location comments from ext4_uboot.h
  ext4l: Move file_operations and inode_operations to linux/fs.h
  ext4l: Move struct inode and time accessors to linux/fs.h
  ext4l: Move sb_ functions and SB_ macros to super_types.h
  ext4l: Move seq_ functions to linux/seq_file.h
  ext4l: Move inode state accessors to linux/fs.h
  ext4l: Move generic VFS operations to linux/fs.h
  ext4l: Move block device operations to linux/blkdev.h
  ext4l: Move file_ functions to linux/fs.h
  ext4l: Move fsnotify_sb_error() to linux/fs.h
  ext4l: Move DEFINE_WAIT to linux/wait.h
  ext4l: Move filemap_fdatawait_range_keep_errors() to pagemap.h
  ext4l: Move various stubs to proper linux/ headers
  ext4l: Consolidate DX_HASH_* into EXT4_UBOOT_NO_EXT4_H block
  ext4l: Have hash.c include ext4.h directly
  ext4l: Move inode and filesystem helpers to linux/fs.h
  ext4l: Move time_is_before_jiffies() to linux/jiffies.h
  ext4l: Remove duplicate ext4_update_overhead() declaration
  ext4l: Move xattr helper stubs to linux/xattr.h
  ext4l: Remove duplicate __ext4_xattr_set_credits() declaration
  ext4l: Move iomap stubs to linux/iomap.h
  ext4l: Move setattr stubs to linux/fs.h
  ext4l: Move finish_open_simple() and ihold() to linux/fs.h
  ext4l: Move nd_terminate_link() to linux/namei.h
  ext4l: Move blk_holder_ops to linux/blkdev.h
  ext4l: Move more stubs to standard Linux headers
  ext4l: Move WHITEOUT and usercopy stubs to headers
  ext4l: Move O_SYNC, S_NOQUOTA and kfree_link to headers
  linux: Add PAGE_SHIFT and PAGE_MASK to linux/compat.h
  linux: Add DEFINE_RAW_FLEX to linux/overflow.h
  ext4l: Consolidate and sort includes in ext4_uboot.h

 .../mach-stm32mp/cmd_stm32prog/stm32prog.c    |    9 +-
 fs/ext4l/ext4_uboot.h                         | 1476 ++---------------
 fs/ext4l/hash.c                               |    4 +-
 fs/ext4l/stub.c                               |    5 +
 fs/ubifs/gc.c                                 |   19 +-
 fs/ubifs/replay.c                             |    6 +-
 include/linux/blkdev.h                        |   42 +
 include/linux/compat.h                        |    7 +
 include/linux/dax.h                           |   23 +-
 include/linux/fs.h                            |  336 +++-
 include/linux/fs/super_types.h                |   44 +
 include/linux/iomap.h                         |    4 +
 include/linux/jiffies.h                       |    3 +
 include/linux/ktime.h                         |    9 +
 include/linux/list_sort.h                     |    8 +-
 include/linux/mm_types.h                      |    3 +
 include/linux/namei.h                         |   11 +
 include/linux/overflow.h                      |   12 +
 include/linux/pagemap.h                       |    2 +
 include/linux/percpu.h                        |    1 +
 include/linux/prefetch.h                      |    4 +-
 include/linux/proc_fs.h                       |    1 +
 include/linux/rwsem.h                         |    2 +
 include/linux/sched/mm.h                      |    3 +
 include/linux/seq_file.h                      |    8 +
 include/linux/slab.h                          |    2 +
 include/linux/sort.h                          |    2 +-
 include/linux/wait.h                          |    3 +
 include/linux/xattr.h                         |    4 +
 lib/efi_loader/efi_memory.c                   |    7 +-
 lib/list_sort.c                               |   12 +-
 31 files changed, 716 insertions(+), 1356 deletions(-)