]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: introduce per-inode DAX enablement
authorDave Chinner <dchinner@redhat.com>
Mon, 4 Jan 2016 05:44:15 +0000 (16:44 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 4 Jan 2016 05:44:15 +0000 (16:44 +1100)
commit87258a8fd23f54b4c39f3b44d3ba88d907c730ac
tree216088a0e082b5458f570a31f5507fb63053de1a
parent6f8ee146a21f5c39440f29b3434a1e0b08438dd0
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.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_format.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iops.c
include/uapi/linux/fs.h