Skip to contentSkip to conversation

xfs: don't allow reflink + realtime filesystems

PATCH In review Darrick J. Wong 2 participants 2 messages Feb 1, 2018 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: don't allow reflink + realtime filesystems

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

We don't support realtime filesystems with reflink either, so fail those mounts.

---
 fs/xfs/xfs_super.c |    7 +++++++
 1 file changed, 7 insertions(+)
fs/xfs/xfs_super.c +7 -0
index a83a9f0..7aba628 100644
@@ -1684,6 +1684,13 @@ xfs_fs_fill_super(
 		}
 	}
 
+	if (xfs_sb_version_hasreflink(&mp->m_sb) && mp->m_sb.sb_rblocks) {
+		xfs_alert(mp,
+	"reflink not compatible with realtime device!");
+		error = -EINVAL;
+		goto out_filestream_unmount;
+	}
+
 	if (xfs_sb_version_hasrmapbt(&mp->m_sb) && mp->m_sb.sb_rblocks) {
 		xfs_alert(mp,
 	"reverse mapping btree not compatible with realtime device!");
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Darrick J. Wong

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

We don't support realtime filesystems with reflink either, so fail those mounts.

Quoted 26 lines
---
 fs/xfs/xfs_super.c |    7 +++++++
 1 file changed, 7 insertions(+)
fs/xfs/xfs_super.c +7 -1
index a83a9f0..7aba628 100644
@@ -1684,6 +1684,13 @@ xfs_fs_fill_super(
 		}
 	}
 
+	if (xfs_sb_version_hasreflink(&mp->m_sb) && mp->m_sb.sb_rblocks) {
+		xfs_alert(mp,
+	"reflink not compatible with realtime device!");
+		error = -EINVAL;
+		goto out_filestream_unmount;
+	}
+
 	if (xfs_sb_version_hasrmapbt(&mp->m_sb) && mp->m_sb.sb_rblocks) {
 		xfs_alert(mp,
 	"reverse mapping btree not compatible with realtime device!");
--

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