]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: advertise metadata directory feature
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:21:47 +0000 (14:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:13:16 +0000 (17:13 -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>
libxfs/xfs_fs.h
libxfs/xfs_sb.c
man/man2/ioctl_xfs_fsgeometry.2

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 d59fa5093a3d08ce61c7be23c39f16c85ac93e37..96f3961ede14680d57d19752aaaf354175a2d15e 100644 (file)
@@ -1276,6 +1276,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);
 
index db7698fa922b8731c70d75b63bdc09b9515e6c90..c808ad5b8b9190deb62a08be7eb15b69816512ab 100644 (file)
@@ -214,6 +214,9 @@ Filesystem supports sharing blocks between files.
 .TP
 .B XFS_FSOP_GEOM_FLAGS_EXCHANGE_RANGE
 Filesystem can exchange file contents atomically via XFS_IOC_EXCHANGE_RANGE.
+.TP
+.B XFS_FSOP_GEOM_FLAGS_METADIR
+Filesystem contains a metadata directory tree.
 .RE
 .SH XFS METADATA HEALTH REPORTING
 .PP