Skip to content

Commit 8fc7e23

Browse files
Christoph Hellwigbrauner
authored andcommitted
fs: reformat the statx definition
The comments after the declaration are becoming rather unreadable with long enough comments. Move them into lines of their own. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: John Garry <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 40384c8 commit 8fc7e23

File tree

1 file changed

+72
-23
lines changed

1 file changed

+72
-23
lines changed

include/uapi/linux/stat.h

Lines changed: 72 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -98,43 +98,92 @@ struct statx_timestamp {
9898
*/
9999
struct statx {
100100
/* 0x00 */
101-
__u32 stx_mask; /* What results were written [uncond] */
102-
__u32 stx_blksize; /* Preferred general I/O size [uncond] */
103-
__u64 stx_attributes; /* Flags conveying information about the file [uncond] */
101+
/* What results were written [uncond] */
102+
__u32 stx_mask;
103+
104+
/* Preferred general I/O size [uncond] */
105+
__u32 stx_blksize;
106+
107+
/* Flags conveying information about the file [uncond] */
108+
__u64 stx_attributes;
109+
104110
/* 0x10 */
105-
__u32 stx_nlink; /* Number of hard links */
106-
__u32 stx_uid; /* User ID of owner */
107-
__u32 stx_gid; /* Group ID of owner */
108-
__u16 stx_mode; /* File mode */
111+
/* Number of hard links */
112+
__u32 stx_nlink;
113+
114+
/* User ID of owner */
115+
__u32 stx_uid;
116+
117+
/* Group ID of owner */
118+
__u32 stx_gid;
119+
120+
/* File mode */
121+
__u16 stx_mode;
109122
__u16 __spare0[1];
123+
110124
/* 0x20 */
111-
__u64 stx_ino; /* Inode number */
112-
__u64 stx_size; /* File size */
113-
__u64 stx_blocks; /* Number of 512-byte blocks allocated */
114-
__u64 stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
125+
/* Inode number */
126+
__u64 stx_ino;
127+
128+
/* File size */
129+
__u64 stx_size;
130+
131+
/* Number of 512-byte blocks allocated */
132+
__u64 stx_blocks;
133+
134+
/* Mask to show what's supported in stx_attributes */
135+
__u64 stx_attributes_mask;
136+
115137
/* 0x40 */
116-
struct statx_timestamp stx_atime; /* Last access time */
117-
struct statx_timestamp stx_btime; /* File creation time */
118-
struct statx_timestamp stx_ctime; /* Last attribute change time */
119-
struct statx_timestamp stx_mtime; /* Last data modification time */
138+
/* Last access time */
139+
struct statx_timestamp stx_atime;
140+
141+
/* File creation time */
142+
struct statx_timestamp stx_btime;
143+
144+
/* Last attribute change time */
145+
struct statx_timestamp stx_ctime;
146+
147+
/* Last data modification time */
148+
struct statx_timestamp stx_mtime;
149+
120150
/* 0x80 */
121-
__u32 stx_rdev_major; /* Device ID of special file [if bdev/cdev] */
151+
/* Device ID of special file [if bdev/cdev] */
152+
__u32 stx_rdev_major;
122153
__u32 stx_rdev_minor;
123-
__u32 stx_dev_major; /* ID of device containing file [uncond] */
154+
155+
/* ID of device containing file [uncond] */
156+
__u32 stx_dev_major;
124157
__u32 stx_dev_minor;
158+
125159
/* 0x90 */
126160
__u64 stx_mnt_id;
127-
__u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */
128-
__u32 stx_dio_offset_align; /* File offset alignment for direct I/O */
161+
162+
/* Memory buffer alignment for direct I/O */
163+
__u32 stx_dio_mem_align;
164+
165+
/* File offset alignment for direct I/O */
166+
__u32 stx_dio_offset_align;
167+
129168
/* 0xa0 */
130-
__u64 stx_subvol; /* Subvolume identifier */
131-
__u32 stx_atomic_write_unit_min; /* Min atomic write unit in bytes */
132-
__u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */
169+
/* Subvolume identifier */
170+
__u64 stx_subvol;
171+
172+
/* Min atomic write unit in bytes */
173+
__u32 stx_atomic_write_unit_min;
174+
175+
/* Max atomic write unit in bytes */
176+
__u32 stx_atomic_write_unit_max;
177+
133178
/* 0xb0 */
134-
__u32 stx_atomic_write_segments_max; /* Max atomic write segment count */
179+
/* Max atomic write segment count */
180+
__u32 stx_atomic_write_segments_max;
181+
135182
__u32 __spare1[1];
183+
136184
/* 0xb8 */
137185
__u64 __spare3[9]; /* Spare space for future expansion */
186+
138187
/* 0x100 */
139188
};
140189

0 commit comments

Comments
 (0)