]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: advertise metadata directory feature
authorDarrick J. Wong <djwong@kernel.org>
Mon, 25 Nov 2024 21:14:17 +0000 (13:14 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:25 +0000 (18:01 -0800)
Source kernel commit: 688828d8f8cdf8b1b917de938a1ce86a93fdbba9

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>
libxfs/xfs_fs.h
libxfs/xfs_sb.c

index 860284064c5aa9304d045b3e9ebfcf346e9fd968..a42c1a33691c0f1ce64d89ccf36a41800835daf2 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 de12edd8192e1c290f31616d20654af0a38b6b8b..4ca57d592be8fa40aa529c77078ecab2c1eac39a 100644 (file)
@@ -1306,6 +1306,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);