diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-30 13:03:45 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-31 08:58:33 -0700 |
commit | ba23cba9b3bdc967aabdc6ff1e3e9b11ce05bb4f (patch) | |
tree | ab508ad6c442fa52b4b59a27edb5084279dbb6d9 /fs/xfs/xfs_ioctl.c | |
parent | d25522f10cfa342a20867086a516c45c87b0877c (diff) | |
download | linux-ba23cba9b3bdc967aabdc6ff1e3e9b11ce05bb4f.tar.gz linux-ba23cba9b3bdc967aabdc6ff1e3e9b11ce05bb4f.tar.bz2 linux-ba23cba9b3bdc967aabdc6ff1e3e9b11ce05bb4f.zip |
fs: allow per-device dax status checking for filesystems
Change bdev_dax_supported so it takes a bdev parameter. This enables
multi-device filesystems like xfs to check that a dax device can work for
the particular filesystem. Once that's in place, actually fix all the
parts of XFS where we need to be able to distinguish between datadev and
rtdev.
This patch fixes the problem where we screw up the dax support checking
in xfs if the datadev and rtdev have different dax capabilities.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
[rez: Re-added __bdev_dax_supported() for !CONFIG_FS_DAX cases]
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index f9c97ea52961..c9a5b75a73a8 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -1103,7 +1103,8 @@ xfs_ioctl_setattr_dax_invalidate( if (fa->fsx_xflags & FS_XFLAG_DAX) { if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) return -EINVAL; - if (bdev_dax_supported(sb, sb->s_blocksize) < 0) + if (bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)), + sb->s_blocksize) < 0) return -EINVAL; } |