From: Simon Glass <simon.glass@canonical.com> Move struct fstrim_range to include/linux/fs.h where it belongs in the Linux kernel header hierarchy. This structure is used for FITRIM ioctl. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 7 +------ include/linux/fs.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 55a06d01996..91d432d391d 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -395,12 +395,7 @@ typedef long long qsize_t; /* mnt_idmap - use linux/mnt_idmapping.h */ #include <linux/mnt_idmapping.h> -/* fstrim_range - stub */ -struct fstrim_range { - u64 start; - u64 len; - u64 minlen; -}; +/* fstrim_range is in linux/fs.h */ /* rw_semaphore - defined in linux/rwsem.h, include it */ #include <linux/rwsem.h> diff --git a/include/linux/fs.h b/include/linux/fs.h index 75e4bd3e951..1b0059ca1a7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -305,4 +305,18 @@ enum { #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) +/** + * struct fstrim_range - fstrim ioctl argument + * @start: first byte to trim + * @len: number of bytes to trim + * @minlen: minimum extent length + * + * Used for FITRIM ioctl to trim unused blocks. + */ +struct fstrim_range { + u64 start; + u64 len; + u64 minlen; +}; + #endif /* _LINUX_FS_H */ -- 2.43.0