[Concept,07/16] ext4l: Move fstrim_range to linux/fs.h
Commit Message
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(-)
@@ -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>
@@ -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 */