[Concept,00/23] Reduce ext4_uboot.h by moving definitions to linux headers

Message ID 20260119061529.3383191-1-sjg@u-boot.org
Headers
Series Reduce ext4_uboot.h by moving definitions to linux headers |

Message

Simon Glass Jan. 19, 2026, 6:14 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

This series continues the work to reduce fs/ext4l/ext4_uboot.h by
moving definitions to their proper locations in include/linux/

The ext4l compatibility header started at 2584 lines. Previous work
reduced it to 1816 lines. This series further reduces it to 1677
lines by moving various definitions to appropriate headers:

- Block I/O flags (REQ_OP_*, REQ_SYNC, etc.) to linux/blk_types.h
- Block device flags (BLK_OPEN_*) to linux/blkdev.h
- Memory allocation flags (__GFP_*, SLAB_*) to linux/slab.h
- Scheduler stubs to linux/sched.h
- Process flags (PF_MEMALLOC*) to linux/sched.h
- System state definitions to linux/kernel.h
- Quota format constants to linux/quotaops.h
- STATX flags and struct kstat to linux/stat.h
- Timer definitions to new linux/hrtimer.h
- Inode mutex classes to linux/fs.h
- Various other small moves

This improves code organisation by placing definitions in headers
matching Linux kernel structure, making the codebase easier to
maintain and understand.


Simon Glass (23):
  linux: random: Add get_random_u32_below and prandom_u32_max
  linux: path: Add path_put and d_path stubs
  linux: Add minmax.h with in_range helper
  linux: Add writeback.h with writeback operation stubs
  linux: Add iversion.h with inode version stubs
  linux: Add namei.h with pathname lookup flags
  linux: Add fsverity.h with fs-verity stubs
  linux: quotaops: Add more quota operation stubs
  linux: Add ioprio.h with I/O priority definitions
  ext4l: Move rwsem_is_locked to linux/rwsem.h
  ext4l: Add linux/hrtimer.h with timer stubs
  ext4l: Move STATX_* and struct kstat to linux/stat.h
  ext4l: Move REQ_OP and SLAB flags to proper headers
  ext4l: Move REQ_IDLE and REQ_PREFLUSH to blk_types.h
  ext4l: Move QFMT_VFS_* constants to quotaops.h
  ext4l: Move REQ_META, REQ_PRIO, REQ_RAHEAD to blk_types.h
  ext4l: Move __GFP_MOVABLE and __GFP_FS to slab.h
  ext4l: Move system_state definitions to linux/kernel.h
  ext4l: Move BLK_OPEN_* flags to linux/blkdev.h
  ext4l: Move scheduler stubs to linux/sched.h
  ext4l: Move PF_MEMALLOC flags to linux/sched.h
  ext4l: Move SECTOR_SHIFT to linux/blk_types.h
  ext4l: Move I_MUTEX_* constants to linux/fs.h

 fs/ext4l/ext4_uboot.h     | 245 +++++++++-----------------------------
 fs/ext4l/stub.c           |  44 +------
 include/linux/blk_types.h |  22 ++++
 include/linux/blkdev.h    |   7 ++
 include/linux/fs.h        |  17 ++-
 include/linux/fsverity.h  |  97 +++++++++++++++
 include/linux/hrtimer.h   |  39 ++++++
 include/linux/ioprio.h    |  64 ++++++++++
 include/linux/iversion.h  |  96 +++++++++++++++
 include/linux/kernel.h    |  17 +++
 include/linux/minmax.h    |  52 ++++++++
 include/linux/namei.h     |  26 ++++
 include/linux/path.h      |  31 +++++
 include/linux/quotaops.h  |  61 ++++++++--
 include/linux/random.h    |  25 +++-
 include/linux/rwsem.h     |   1 +
 include/linux/sched.h     |  11 ++
 include/linux/slab.h      |  10 ++
 include/linux/stat.h      |  48 ++++++++
 include/linux/writeback.h |  49 ++++++++
 20 files changed, 713 insertions(+), 249 deletions(-)
 create mode 100644 include/linux/fsverity.h
 create mode 100644 include/linux/hrtimer.h
 create mode 100644 include/linux/ioprio.h
 create mode 100644 include/linux/iversion.h
 create mode 100644 include/linux/minmax.h
 create mode 100644 include/linux/namei.h
 create mode 100644 include/linux/writeback.h