History

uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT

STATX_ATTR_MOUNT_ROOT and STATX_ATTR_DAX got merged with the same value, so one of them needs fixing. Move STATX_ATTR_DAX. While we're in here, clarify the value-matching scheme for some of the attributes, and explain why the value for DAX does not match.

Eric Sandeen committed 5 years ago

Commit 72d12491 parent 062c9cd1 file · +6 −3Browse files

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

Unified · Split

include/uapi/linux/stat.h+6−3
@@ -171,9 +171,12 @@ struct statx { · 170 unmodified lines
171171 * be of use to ordinary userspace programs such as GUIs or ls rather than
172172 * specialised tools.
173173 *
174− * Note that the flags marked [I] correspond to generic FS_IOC_FLAGS
174+ * Note that the flags marked [I] correspond to the FS_IOC_SETFLAGS flags
175175 * semantically. Where possible, the numerical value is picked to correspond
176− * also.
176+ * also. Note that the DAX attribute indicates that the file is in the CPU
177+ * direct access state. It does not correspond to the per-inode flag that
178+ * some filesystems support.
179+ *
177180 */
178181 #define STATX_ATTR_COMPRESSED 0x00000004 /* [I] File is compressed by the fs */
179182 #define STATX_ATTR_IMMUTABLE 0x00000010 /* [I] File is marked immutable */
@@ -183,7 +186,7 @@ struct statx { · 3 unmodified lines
183186 #define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */
184187 #define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */
185188 #define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */
186−#define STATX_ATTR_DAX 0x00002000 /* [I] File is DAX */
189+#define STATX_ATTR_DAX 0x00200000 /* File is currently in DAX state */
187190
188191
189192 #endif /* _UAPI_LINUX_STAT_H */