xfs: add rmap btree geometry feature flag
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 3 Aug 2016 02:16:44 +0000 (12:16 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 3 Aug 2016 02:16:44 +0000 (12:16 +1000)
Originally-From: Dave Chinner <dchinner@redhat.com>

So xfs_info and other userspace utilities know the filesystem is
using this feature.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/xfs_fsops.c

index f5ec9c5ccae6ace2873c0f1c44db1816baf0847b..79455058b752588e7855afde61ad59ba4ce3186f 100644 (file)
@@ -206,6 +206,7 @@ typedef struct xfs_fsop_resblks {
 #define XFS_FSOP_GEOM_FLAGS_FTYPE      0x10000 /* inode directory types */
 #define XFS_FSOP_GEOM_FLAGS_FINOBT     0x20000 /* free inode btree */
 #define XFS_FSOP_GEOM_FLAGS_SPINODES   0x40000 /* sparse inode chunks  */
+#define XFS_FSOP_GEOM_FLAGS_RMAPBT     0x80000 /* Reverse mapping btree */
 
 /*
  * Minimum and maximum sizes need for growth checks.
index 83304d54e6d45388b05396307189e61ba3a2f6df..0f96847b90e1175d2c6d0f497fe278e67f95e141 100644 (file)
@@ -106,7 +106,9 @@ xfs_fs_geometry(
                        (xfs_sb_version_hasfinobt(&mp->m_sb) ?
                                XFS_FSOP_GEOM_FLAGS_FINOBT : 0) |
                        (xfs_sb_version_hassparseinodes(&mp->m_sb) ?
-                               XFS_FSOP_GEOM_FLAGS_SPINODES : 0);
+                               XFS_FSOP_GEOM_FLAGS_SPINODES : 0) |
+                       (xfs_sb_version_hasrmapbt(&mp->m_sb) ?
+                               XFS_FSOP_GEOM_FLAGS_RMAPBT : 0);
                geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ?
                                mp->m_sb.sb_logsectsize : BBSIZE;
                geo->rtsectsize = mp->m_sb.sb_blocksize;