Skip to contentSkip to conversation

xfs: don't allow DAX on reflink filesystems

PATCH In review Darrick J. Wong 4 participants 7 messages Jan 31, 2018 – Feb 2, 2018 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: don't allow DAX on reflink filesystems

From: Darrick J. Wong <[email protected]>

Now that reflink is no longer experimental, reject attempts to mount with DAX until that whole mess gets sorted out.

---
 fs/xfs/xfs_super.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/xfs/xfs_super.c +4 -1
index f436eec..fd34cf2 100644
@@ -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) {
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Now that reflink is no longer experimental, reject attempts to mount with DAX until that whole mess gets sorted out.

nit: Check alignment of the warning message (probably ok?)...

Quoted 26 lines
---
 fs/xfs/xfs_super.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/xfs/xfs_super.c +4 -2
index f436eec..fd34cf2 100644
@@ -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) {
--

To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Reviewed-by
#2 lore raw
Quoted 9 lines · Bill O'Donnell
Quoted 6 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Now that reflink is no longer experimental, reject attempts to mount with DAX until that whole mess gets sorted out.

nit: Check alignment of the warning message (probably ok?)...

nevermind. Alignment wasn't in your change. :)

Quoted 33 lines
Quoted 23 lines
---
 fs/xfs/xfs_super.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/xfs/xfs_super.c +4 -2
index f436eec..fd34cf2 100644
@@ -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) {
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Reviewed-by on v1 1/1
#3 lore raw
In reply to Darrick J. Wong
Quoted 6 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Now that reflink is no longer experimental, reject attempts to mount with DAX until that whole mess gets sorted out.

Make sense. Anyone trying to make this work needs to patch the kernel, so having to patch out this check is no big deal.

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]
#5 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 4 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Now that reflink is no longer experimental, reject attempts to mount with DAX until that whole mess gets sorted out.

Didn't I send exactly the same patch about a week ago?

I haven't received any such patch (but Oracle mail has been dropping and delaying mail recently) and marc.info doesn't bring up anything relevant for a search of 'DAX' and 'Hellwig'. :/

--D

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 3 lines · Darrick J. Wong

I haven't received any such patch (but Oracle mail has been dropping and delaying mail recently) and marc.info doesn't bring up anything relevant for a search of 'DAX' and 'Hellwig'. :/

I've found my local commits from Jan 18, but it seems like they never made it out, despite me remembering sending them. So it looks the issue was in my side.