Message ID | 20200413054046.1560106-4-ira.weiny@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | Enable per-file/per-directory DAX operations V7 | expand |
On Sun, Apr 12, 2020 at 10:40:40PM -0700, ira.weiny@intel.com wrote: > STATX_ATTR_DAX > > The file is in the DAX (cpu direct access) state. DAX state > attempts to minimize software cache effects for both I/O and > memory mappings of this file. It requires a file system which > has been configured to support DAX. Can we remove the misleading DAX name? Something like STATX_ATTR_DIRECT_LOAD_STORE?
On Tue, Apr 14, 2020 at 08:23:06AM +0200, Christoph Hellwig wrote: > On Sun, Apr 12, 2020 at 10:40:40PM -0700, ira.weiny@intel.com wrote: > > STATX_ATTR_DAX > > > > The file is in the DAX (cpu direct access) state. DAX state > > attempts to minimize software cache effects for both I/O and > > memory mappings of this file. It requires a file system which > > has been configured to support DAX. > > Can we remove the misleading DAX name? Something like > STATX_ATTR_DIRECT_LOAD_STORE? This is easy enough to change but... Honestly I feel like this ship has already sailed. We have so much out there which uses the term "DAX". Is it really better to introduce a new terminology for the same thing? Ira
diff --git a/fs/stat.c b/fs/stat.c index 030008796479..894699c74dde 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -79,6 +79,9 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat, if (IS_AUTOMOUNT(inode)) stat->attributes |= STATX_ATTR_AUTOMOUNT; + if (IS_DAX(inode)) + stat->attributes |= STATX_ATTR_DAX; + if (inode->i_op->getattr) return inode->i_op->getattr(path, stat, request_mask, query_flags); diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h index ad80a5c885d5..e5f9d5517f6b 100644 --- a/include/uapi/linux/stat.h +++ b/include/uapi/linux/stat.h @@ -169,6 +169,7 @@ struct statx { #define STATX_ATTR_ENCRYPTED 0x00000800 /* [I] File requires key to decrypt in fs */ #define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount trigger */ #define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */ +#define STATX_ATTR_DAX 0x00002000 /* [I] File is DAX */ #endif /* _UAPI_LINUX_STAT_H */