xfs: enable the rmap btree functionality
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 3 Aug 2016 02:20:57 +0000 (12:20 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 3 Aug 2016 02:20:57 +0000 (12:20 +1000)
Originally-From: Dave Chinner <dchinner@redhat.com>

Add the feature flag to the supported matrix so that the kernel can
mount and use rmap btree enabled filesystems

Signed-off-by: Dave Chinner <dchinner@redhat.com>
[darrick.wong@oracle.com: move the experimental tag]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_format.h
fs/xfs/xfs_super.c

index f6a0641e64c8adba6a82262aa627d1edf41948b8..f814d42c73b2fb7484dd76ad024f63891de155f0 100644 (file)
@@ -457,7 +457,8 @@ xfs_sb_has_compat_feature(
 #define XFS_SB_FEAT_RO_COMPAT_FINOBT   (1 << 0)                /* free inode btree */
 #define XFS_SB_FEAT_RO_COMPAT_RMAPBT   (1 << 1)                /* reverse map btree */
 #define XFS_SB_FEAT_RO_COMPAT_ALL \
-               (XFS_SB_FEAT_RO_COMPAT_FINOBT)
+               (XFS_SB_FEAT_RO_COMPAT_FINOBT | \
+                XFS_SB_FEAT_RO_COMPAT_RMAPBT)
 #define XFS_SB_FEAT_RO_COMPAT_UNKNOWN  ~XFS_SB_FEAT_RO_COMPAT_ALL
 static inline bool
 xfs_sb_has_ro_compat_feature(
index 9f8090951f09124ae5dda27a97055ffbff0bd7d6..45773df1dd0b12a464a485998cdc7cc6f15d455e 100644 (file)
@@ -1574,6 +1574,10 @@ xfs_fs_fill_super(
                }
        }
 
+       if (xfs_sb_version_hasrmapbt(&mp->m_sb))
+               xfs_alert(mp,
+       "EXPERIMENTAL reverse mapping btree feature enabled. Use at your own risk!");
+
        error = xfs_mountfs(mp);
        if (error)
                goto out_filestream_unmount;