History

xfs: introduce per-inode DAX enablement

Rather than just being able to turn DAX on and off via a mount option, some applications may only want to enable DAX for certain performance critical files in a filesystem. This patch introduces a new inode flag to enable DAX in the v3 inode di_flags2 field. It adds support for setting and clearing flags in the di_flags2 field via the XFS_IOC_FSSETXATTR ioctl, and sets the S_DAX inode flag appropriately when it is seen. When this flag is set on a directory, it acts as an "inherit flag". That is, inodes created in the directory will automatically inherit the on-disk inode DAX flag, enabling administrators to set up directory heirarchies that automatically use DAX. Setting this flag on an empty root directory will make the entire filesystem use DAX by default.

Dave Chinner committed 10 years ago

Commit 58f88ca1 parent e7b89485 files · +52 −12Browse files

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

Unified · Split

include/uapi/linux/fs.h+1−0
@@ -138,6 +138,7 @@ struct fsxattr { · 137 unmodified lines
138#define FS_XFLAG_EXTSZINHERIT 0x00001000 /* inherit inode extent size */138#define FS_XFLAG_EXTSZINHERIT 0x00001000 /* inherit inode extent size */
139#define FS_XFLAG_NODEFRAG 0x00002000 /* do not defragment */139#define FS_XFLAG_NODEFRAG 0x00002000 /* do not defragment */
140#define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */140#define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */
141#define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */
141#define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */142#define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
142 143
143/* the read-only stuff doesn't really belong here, but any other place is144/* the read-only stuff doesn't really belong here, but any other place is

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t