]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: advertise metadata directory feature
authorDarrick J. Wong <djwong@kernel.org>
Wed, 29 May 2024 04:11:00 +0000 (21:11 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 1 Aug 2024 00:10:02 +0000 (17:10 -0700)
Advertise the existence of the metadata directory feature; this will be
used by scrub to decide if it needs to scan the metadir too.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/libxfs/xfs_sb.c

index c85c8077fac391ba182fe89334c016d3c6934d38..aba7fb0389babd9ab36c8160b14eeefc9d88da61 100644 (file)
@@ -242,6 +242,8 @@ typedef struct xfs_fsop_resblks {
 #define XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE (1 << 24) /* exchange range */
 #define XFS_FSOP_GEOM_FLAGS_PARENT     (1 << 25) /* linux parent pointers */
 
+#define XFS_FSOP_GEOM_FLAGS_METADIR    (1U << 30) /* metadata directories */
+
 /*
  * Minimum and maximum sizes need for growth checks.
  *
index 7afde477c0a790f00642db2749fae28acff12256..1dcbf8ade39f87365d620f0bdfd6cd45cad642fd 100644 (file)
@@ -1279,6 +1279,8 @@ xfs_fs_geometry(
                geo->flags |= XFS_FSOP_GEOM_FLAGS_NREXT64;
        if (xfs_has_exchange_range(mp))
                geo->flags |= XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE;
+       if (xfs_has_metadir(mp))
+               geo->flags |= XFS_FSOP_GEOM_FLAGS_METADIR;
        geo->rtsectsize = sbp->sb_blocksize;
        geo->dirblocksize = xfs_dir2_dirblock_bytes(sbp);