@@ -425,6 +425,10 @@ xfs_bui_validate(
{
struct xfs_map_extent *bmap;
+ if (!xfs_sb_version_hasrmapbt(&mp->m_sb) &&
+ !xfs_sb_version_hasreflink(&mp->m_sb))
+ return false;
+
/* Only one mapping operation per BUI... */
if (buip->bui_format.bui_nextents != XFS_BUI_MAX_FAST_EXTENTS)
return false;
@@ -423,6 +423,9 @@ xfs_cui_validate_phys(
struct xfs_mount *mp,
struct xfs_phys_extent *refc)
{
+ if (!xfs_sb_version_hasreflink(&mp->m_sb))
+ return false;
+
if (refc->pe_flags & ~XFS_REFCOUNT_EXTENT_FLAGS)
return false;
@@ -466,6 +466,9 @@ xfs_rui_validate_map(
struct xfs_mount *mp,
struct xfs_map_extent *rmap)
{
+ if (!xfs_sb_version_hasrmapbt(&mp->m_sb))
+ return false;
+
if (rmap->me_flags & ~XFS_RMAP_EXTENT_FLAGS)
return false;