[Concept,00/16] ext4l: Move definitions to standard Linux headers

Message ID 20260119214846.3087611-1-sjg@u-boot.org
Headers
Series ext4l: Move definitions to standard Linux headers |

Message

Simon Glass Jan. 19, 2026, 9:48 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

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

The ext4_uboot.h file provides Linux kernel compatibility for the ext4l
filesystem driver. Many definitions were placed there temporarily during
initial development. This series moves them to standard header locations
matching the Linux kernel organisation:

- Inode locking stubs and helpers to linux/fs.h
- Compiler helpers (data_race, might_sleep) to linux/compiler.h and
  linux/kernel.h
- Instruction pointer macros to linux/kernel.h
- Credential types (user_namespace) to linux/cred.h
- Filesystem types (fstrim_range) to linux/fs.h
- Quota types (qsize_t) to linux/quotaops.h
- String helpers (memweight) to linux/string.h
- UID/GID helpers to new linux/highuid.h
- Overflow helpers (struct_size) to new linux/overflow.h
- Min/max helpers (umin) to linux/minmax.h
- Slab helpers (KMEM_CACHE) to linux/slab.h
- Rate limit helpers (WARN_RATELIMIT) to linux/ratelimit.h
- Cycle counter (get_cycles) to new asm-generic/timex.h
- Superblock definition (struct super_block) to new linux/fs/super_types.h

This reduces ext4_uboot.h from 1666 to 1620 lines.


Simon Glass (16):
  ext4l: Move inode locking stubs to linux/fs.h
  ext4l: Add linux/fs/super_types.h for struct super_block
  ext4l: Move inode and superblock helpers to linux/fs.h
  ext4l: Move data_race, might_sleep, fallthrough to standard headers
  ext4l: Move _RET_IP_, _THIS_IP_, BITS_PER_BYTE to standard headers
  ext4l: Move user_namespace to linux/cred.h
  ext4l: Move fstrim_range to linux/fs.h
  ext4l: Move qsize_t to linux/quotaops.h
  ext4l: Move memweight to linux/string.h
  ext4l: Add linux/highuid.h and move UID/GID helpers
  ext4l: Add linux/overflow.h and move struct_size
  ext4l: Move umin to linux/minmax.h
  ext4l: Move KMEM_CACHE macro to linux/slab.h
  ext4l: Use existing linux/nospec.h for array_index_nospec
  ext4l: Move WARN_RATELIMIT to linux/ratelimit.h
  ext4l: Add asm-generic/timex.h and move get_cycles

 fs/ext4l/ext4_uboot.h          | 148 +++++++--------------------------
 include/asm-generic/timex.h    |  21 +++++
 include/linux/compiler.h       |   8 ++
 include/linux/cred.h           |   9 ++
 include/linux/fs.h             |  51 +++++++++++-
 include/linux/fs/super_types.h |  68 +++++++++++++++
 include/linux/highuid.h        |  19 +++++
 include/linux/kernel.h         |  17 ++++
 include/linux/minmax.h         |  18 ++++
 include/linux/overflow.h       |  23 +++++
 include/linux/quotaops.h       |   3 +
 include/linux/ratelimit.h      |   9 ++
 include/linux/slab.h           |  10 +++
 include/linux/string.h         |  24 ++++++
 14 files changed, 308 insertions(+), 120 deletions(-)
 create mode 100644 include/asm-generic/timex.h
 create mode 100644 include/linux/fs/super_types.h
 create mode 100644 include/linux/highuid.h
 create mode 100644 include/linux/overflow.h