xfs: don't allow DAX on reflink filesystems
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
@@ -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 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.
Signed-off-by Darrick J. Wong <[email protected]>
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@@ -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
Bill O'Donnell
Reviewed-byQuoted 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.
Signed-off-by Darrick J. Wong <[email protected]>nit: Check alignment of the warning message (probably ok?)...
nevermind. Alignment wasn't in your change. :)
Quoted 33 lines
Reviewed-by Bill O'Donnell <[email protected]>Quoted 23 lines
--- fs/xfs/xfs_super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)fs/xfs/xfs_super.c +4
-2@@ -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
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.
Signed-off-by Darrick J. Wong <[email protected]>
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]
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?
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
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.