Message ID | 20240828051149.1897291-2-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/3] fs: reformat the statx definition | expand |
On Wed, Aug 28, 2024 at 08:11:01AM +0300, Christoph Hellwig wrote: > 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 <hch@lst.de> Space for full sentences, what luxury! ;) Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > --- > include/uapi/linux/stat.h | 95 +++++++++++++++++++++++++++++---------- > 1 file changed, 72 insertions(+), 23 deletions(-) > > diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h > index 887a2528644168..8b35d7d511a287 100644 > --- a/include/uapi/linux/stat.h > +++ b/include/uapi/linux/stat.h > @@ -98,43 +98,92 @@ struct statx_timestamp { > */ > struct statx { > /* 0x00 */ > - __u32 stx_mask; /* What results were written [uncond] */ > - __u32 stx_blksize; /* Preferred general I/O size [uncond] */ > - __u64 stx_attributes; /* Flags conveying information about the file [uncond] */ > + /* What results were written [uncond] */ > + __u32 stx_mask; > + > + /* Preferred general I/O size [uncond] */ > + __u32 stx_blksize; > + > + /* Flags conveying information about the file [uncond] */ > + __u64 stx_attributes; > + > /* 0x10 */ > - __u32 stx_nlink; /* Number of hard links */ > - __u32 stx_uid; /* User ID of owner */ > - __u32 stx_gid; /* Group ID of owner */ > - __u16 stx_mode; /* File mode */ > + /* Number of hard links */ > + __u32 stx_nlink; > + > + /* User ID of owner */ > + __u32 stx_uid; > + > + /* Group ID of owner */ > + __u32 stx_gid; > + > + /* File mode */ > + __u16 stx_mode; > __u16 __spare0[1]; > + > /* 0x20 */ > - __u64 stx_ino; /* Inode number */ > - __u64 stx_size; /* File size */ > - __u64 stx_blocks; /* Number of 512-byte blocks allocated */ > - __u64 stx_attributes_mask; /* Mask to show what's supported in stx_attributes */ > + /* Inode number */ > + __u64 stx_ino; > + > + /* File size */ > + __u64 stx_size; > + > + /* Number of 512-byte blocks allocated */ > + __u64 stx_blocks; > + > + /* Mask to show what's supported in stx_attributes */ > + __u64 stx_attributes_mask; > + > /* 0x40 */ > - struct statx_timestamp stx_atime; /* Last access time */ > - struct statx_timestamp stx_btime; /* File creation time */ > - struct statx_timestamp stx_ctime; /* Last attribute change time */ > - struct statx_timestamp stx_mtime; /* Last data modification time */ > + /* Last access time */ > + struct statx_timestamp stx_atime; > + > + /* File creation time */ > + struct statx_timestamp stx_btime; > + > + /* Last attribute change time */ > + struct statx_timestamp stx_ctime; > + > + /* Last data modification time */ > + struct statx_timestamp stx_mtime; > + > /* 0x80 */ > - __u32 stx_rdev_major; /* Device ID of special file [if bdev/cdev] */ > + /* Device ID of special file [if bdev/cdev] */ > + __u32 stx_rdev_major; > __u32 stx_rdev_minor; > - __u32 stx_dev_major; /* ID of device containing file [uncond] */ > + > + /* ID of device containing file [uncond] */ > + __u32 stx_dev_major; > __u32 stx_dev_minor; > + > /* 0x90 */ > __u64 stx_mnt_id; > - __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */ > - __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */ > + > + /* Memory buffer alignment for direct I/O */ > + __u32 stx_dio_mem_align; > + > + /* File offset alignment for direct I/O */ > + __u32 stx_dio_offset_align; > + > /* 0xa0 */ > - __u64 stx_subvol; /* Subvolume identifier */ > - __u32 stx_atomic_write_unit_min; /* Min atomic write unit in bytes */ > - __u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */ > + /* Subvolume identifier */ > + __u64 stx_subvol; > + > + /* Min atomic write unit in bytes */ > + __u32 stx_atomic_write_unit_min; > + > + /* Max atomic write unit in bytes */ > + __u32 stx_atomic_write_unit_max; > + > /* 0xb0 */ > - __u32 stx_atomic_write_segments_max; /* Max atomic write segment count */ > + /* Max atomic write segment count */ > + __u32 stx_atomic_write_segments_max; > + > __u32 __spare1[1]; > + > /* 0xb8 */ > __u64 __spare3[9]; /* Spare space for future expansion */ > + > /* 0x100 */ > }; > > -- > 2.43.0 > >
diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h index 887a2528644168..8b35d7d511a287 100644 --- a/include/uapi/linux/stat.h +++ b/include/uapi/linux/stat.h @@ -98,43 +98,92 @@ struct statx_timestamp { */ struct statx { /* 0x00 */ - __u32 stx_mask; /* What results were written [uncond] */ - __u32 stx_blksize; /* Preferred general I/O size [uncond] */ - __u64 stx_attributes; /* Flags conveying information about the file [uncond] */ + /* What results were written [uncond] */ + __u32 stx_mask; + + /* Preferred general I/O size [uncond] */ + __u32 stx_blksize; + + /* Flags conveying information about the file [uncond] */ + __u64 stx_attributes; + /* 0x10 */ - __u32 stx_nlink; /* Number of hard links */ - __u32 stx_uid; /* User ID of owner */ - __u32 stx_gid; /* Group ID of owner */ - __u16 stx_mode; /* File mode */ + /* Number of hard links */ + __u32 stx_nlink; + + /* User ID of owner */ + __u32 stx_uid; + + /* Group ID of owner */ + __u32 stx_gid; + + /* File mode */ + __u16 stx_mode; __u16 __spare0[1]; + /* 0x20 */ - __u64 stx_ino; /* Inode number */ - __u64 stx_size; /* File size */ - __u64 stx_blocks; /* Number of 512-byte blocks allocated */ - __u64 stx_attributes_mask; /* Mask to show what's supported in stx_attributes */ + /* Inode number */ + __u64 stx_ino; + + /* File size */ + __u64 stx_size; + + /* Number of 512-byte blocks allocated */ + __u64 stx_blocks; + + /* Mask to show what's supported in stx_attributes */ + __u64 stx_attributes_mask; + /* 0x40 */ - struct statx_timestamp stx_atime; /* Last access time */ - struct statx_timestamp stx_btime; /* File creation time */ - struct statx_timestamp stx_ctime; /* Last attribute change time */ - struct statx_timestamp stx_mtime; /* Last data modification time */ + /* Last access time */ + struct statx_timestamp stx_atime; + + /* File creation time */ + struct statx_timestamp stx_btime; + + /* Last attribute change time */ + struct statx_timestamp stx_ctime; + + /* Last data modification time */ + struct statx_timestamp stx_mtime; + /* 0x80 */ - __u32 stx_rdev_major; /* Device ID of special file [if bdev/cdev] */ + /* Device ID of special file [if bdev/cdev] */ + __u32 stx_rdev_major; __u32 stx_rdev_minor; - __u32 stx_dev_major; /* ID of device containing file [uncond] */ + + /* ID of device containing file [uncond] */ + __u32 stx_dev_major; __u32 stx_dev_minor; + /* 0x90 */ __u64 stx_mnt_id; - __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */ - __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */ + + /* Memory buffer alignment for direct I/O */ + __u32 stx_dio_mem_align; + + /* File offset alignment for direct I/O */ + __u32 stx_dio_offset_align; + /* 0xa0 */ - __u64 stx_subvol; /* Subvolume identifier */ - __u32 stx_atomic_write_unit_min; /* Min atomic write unit in bytes */ - __u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */ + /* Subvolume identifier */ + __u64 stx_subvol; + + /* Min atomic write unit in bytes */ + __u32 stx_atomic_write_unit_min; + + /* Max atomic write unit in bytes */ + __u32 stx_atomic_write_unit_max; + /* 0xb0 */ - __u32 stx_atomic_write_segments_max; /* Max atomic write segment count */ + /* Max atomic write segment count */ + __u32 stx_atomic_write_segments_max; + __u32 __spare1[1]; + /* 0xb8 */ __u64 __spare3[9]; /* Spare space for future expansion */ + /* 0x100 */ };
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 <hch@lst.de> --- include/uapi/linux/stat.h | 95 +++++++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 23 deletions(-)