aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-01-31 17:21:56 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2018-02-02 00:06:15 -0500
commitb6e03c10bf3ff08c7678a946a2208b60e66f4426 (patch)
tree176f2d7261ffbf6848f745133db1efbdd89cf9dc
parent494370ccaae891de0a99b3c23b2df482c95cab8c (diff)
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 <darrick.wong@oracle.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
-rw-r--r--fs/xfs/xfs_super.c5
1 files changed, 4 insertions, 1 deletions
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(
1666 "DAX unsupported by block device. Turning off DAX."); 1666 "DAX unsupported by block device. Turning off DAX.");
1667 mp->m_flags &= ~XFS_MOUNT_DAX; 1667 mp->m_flags &= ~XFS_MOUNT_DAX;
1668 } 1668 }
1669 if (xfs_sb_version_hasreflink(&mp->m_sb)) 1669 if (xfs_sb_version_hasreflink(&mp->m_sb)) {
1670 xfs_alert(mp, 1670 xfs_alert(mp,
1671 "DAX and reflink cannot be used together!"); 1671 "DAX and reflink cannot be used together!");
1672 error = -EINVAL;
1673 goto out_filestream_unmount;
1674 }
1672 } 1675 }
1673 1676
1674 if (mp->m_flags & XFS_MOUNT_DISCARD) { 1677 if (mp->m_flags & XFS_MOUNT_DISCARD) {