@@ -98,43 +98,93 @@ struct statx_timestamp {
9898 */
9999struct 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 */
135- __u32 __spare1 [1 ];
179+ /* Max atomic write segment count */
180+ __u32 stx_atomic_write_segments_max ;
181+
182+ /* File offset alignment for direct I/O reads */
183+ __u32 stx_dio_read_offset_align ;
184+
136185 /* 0xb8 */
137186 __u64 __spare3 [9 ]; /* Spare space for future expansion */
187+
138188 /* 0x100 */
139189};
140190
@@ -164,6 +214,7 @@ struct statx {
164214#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
165215#define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */
166216#define STATX_WRITE_ATOMIC 0x00010000U /* Want/got atomic_write_* fields */
217+ #define STATX_DIO_READ_ALIGN 0x00020000U /* Want/got dio read alignment info */
167218
168219#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
169220
0 commit comments