]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: advertise metadata directory feature
authorDarrick J. Wong <djwong@kernel.org>
Wed, 7 Aug 2024 22:54:14 +0000 (15:54 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 22 Sep 2024 06:07:18 +0000 (08:07 +0200)
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/libxfs/xfs_sb.c

index 860284064c5aa9304d045b3e9ebfcf346e9fd968..162256f9b04c224387ffd5e388b6de2a3e869a85 100644 (file)
@@ -243,6 +243,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 0be67f77bec0d102005da7e2a122ee8b52a44fc2..50d5722ddb96fcd536867727290d3578606a4f12 100644 (file)
@@ -1288,6 +1288,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);