From: Darrick J. Wong Date: Wed, 31 Jan 2018 22:21:56 +0000 (-0800) Subject: xfs: don't allow DAX on reflink filesystems X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=b6e03c10bf3ff08c7678a946a2208b60e66f4426;p=openwrt%2Fstaging%2Fblogic.git xfs: don't allow DAX on reflink filesystems Now that reflink is no longer experimental, reject attempts to mount with DAX until that whole mess gets sorted out. Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell Reviewed-by: Dave Chinner --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index f3e0001f9992..0505605e25c1 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1666,9 +1666,12 @@ xfs_fs_fill_super( "DAX unsupported by block device. Turning off DAX."); mp->m_flags &= ~XFS_MOUNT_DAX; } - if (xfs_sb_version_hasreflink(&mp->m_sb)) + if (xfs_sb_version_hasreflink(&mp->m_sb)) { xfs_alert(mp, "DAX and reflink cannot be used together!"); + error = -EINVAL; + goto out_filestream_unmount; + } } if (mp->m_flags & XFS_MOUNT_DISCARD) {