History

statx: stx_subvol

Add a new statx field for (sub)volume identifiers, as implemented by btrfs and bcachefs. This includes bcachefs support; we'll definitely want btrfs support as well.

Kent Overstreet committed 2 years ago

Commit 2a82bb01 parent 4cece765 files · +11 −1Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/stat.h+3−1
@@ -126,8 +126,9 @@ struct statx { · 125 unmodified lines
126126 __u64 stx_mnt_id;
127127 __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */
128128 __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */
129+ __u64 stx_subvol; /* Subvolume identifier */
129130 /* 0xa0 */
130− __u64 __spare3[12]; /* Spare space for future expansion */
131+ __u64 __spare3[11]; /* Spare space for future expansion */
131132 /* 0x100 */
132133 };
133134
@@ -155,6 +156,7 @@ struct statx { · 21 unmodified lines
155156 #define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
156157 #define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
157158 #define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
159+#define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */
158160
159161 #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
160162