linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: don't fail dax mount w/ reflink if dax gets disabled
@ 2018-09-05 16:24 Eric Sandeen
  2018-09-05 21:54 ` Dave Chinner
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2018-09-05 16:24 UTC (permalink / raw)
  To: linux-xfs

Today, we can get an interesting result when mounting a reflink filesystem
with -o dax on a device that doesn't support it:

XFS (sda1): DAX enabled. Warning: EXPERIMENTAL, use at your own risk
XFS (sda1): DAX unsupported by block device. Turning off DAX.
XFS (sda1): DAX and reflink cannot be used together!

<fail mount>

If we're willing to silently turn off DAX due to incompatibility with the
block device, it makes no sense to then fail the mount due to
incompatibility with the filesystem format.  So, skip this check if we
already decided to turn off DAX and proceed.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 207ee30..c85c432 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1677,8 +1677,7 @@ struct proc_xfs_info {
 			xfs_alert(mp,
 			"DAX unsupported by block device. Turning off DAX.");
 			mp->m_flags &= ~XFS_MOUNT_DAX;
-		}
-		if (xfs_sb_version_hasreflink(&mp->m_sb)) {
+		} else if (xfs_sb_version_hasreflink(&mp->m_sb)) {
 			xfs_alert(mp,
 		"DAX and reflink cannot be used together!");
 			error = -EINVAL;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-06  2:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-05 16:24 [PATCH] xfs: don't fail dax mount w/ reflink if dax gets disabled Eric Sandeen
2018-09-05 21:54 ` Dave Chinner
2018-09-05 21:58   ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).