Patch "xfs: validate bdev support for DAX inode flag" has been added to the 4.13-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
xfs: validate bdev support for DAX inode flag
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xfs-validate-bdev-support-for-dax-inode-flag.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
6851a3db7e224bbb85e23b3c64a506c9e0904382Mon Sep 17 00:00:00 2001
From: Ross Zwisler <[email protected]>
Date: Mon, 18 Sep 2017 14:46:03 -0700
Subject: xfs: validate bdev support for DAX inode flag
From: Ross Zwisler <[email protected]>
commit 6851a3db7e224bbb85e23b3c64a506c9e0904382 upstream.
Currently only the blocksize is checked, but we should really be calling bdev_dax_supported() which also tests to make sure we can get a struct dax_device and that the dax_direct_access() path is working.
This is the same check that we do for the "-o dax" mount option in xfs_fs_fill_super().
This does not fix the race issues that caused the XFS DAX inode option to be disabled, so that option will still be disabled. If/when we re-enable it, though, I think we will want this issue to have been fixed. I also do think that we want to fix this in stable kernels.
--- fs/xfs/xfs_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/xfs_ioctl.c +2 -1
@@ -1088,6 +1088,7 @@ xfs_ioctl_setattr_dax_invalidate( int *join_flags) {struct inode *inode =VFS_I (ip); +struct super_block *sb = inode->i_sb;int error; *join_flags =0 ;
@@ -1100,7 +1101,7 @@ 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 (ip->i_mount->m_sb.sb_blocksize !=PAGE_SIZE ) +if (bdev_dax_supported (sb, sb->s_blocksize) <0 )return -EINVAL ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.13/xfs-validate-bdev-support-for-dax-inode-flag.patch