xfs: advertise metadata directory feature
authorDarrick J. Wong <djwong@kernel.org>
Mon, 4 Nov 2024 04:18:53 +0000 (20:18 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:32 +0000 (13:38 -0800)
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 8602840..a42c1a3 100644 (file)
@@ -242,6 +242,7 @@ typedef struct xfs_fsop_resblks {
 #define XFS_FSOP_GEOM_FLAGS_NREXT64    (1 << 23) /* large extent counters */
 #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    (1 << 26) /* metadata directories */
 
 /*
  * Minimum and maximum sizes need for growth checks.
index 19fa999..4516824 100644 (file)
@@ -1295,6 +1295,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);