Skip to content

Commit

Permalink
fs: reformat the statx definition
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20250109083109.1441561-2-hch@lst.de
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
  • Loading branch information
Christoph Hellwig authored and Christian Brauner committed Jan 9, 2025
1 parent 40384c8 commit 8fc7e23
Showing 1 changed file with 72 additions and 23 deletions.
95 changes: 72 additions & 23 deletions include/uapi/linux/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down

0 comments on commit 8fc7e23

Please sign in to comment.