From: Darrick J. Wong Date: Mon, 25 Nov 2024 21:14:18 +0000 (-0800) Subject: xfs: allow bulkstat to return metadata directories X-Git-Tag: v6.13.0~180 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=428684e8467a6103c7ed67f47a9003343fcaae1c;p=thirdparty%2Fxfsprogs-dev.git xfs: allow bulkstat to return metadata directories Source kernel commit: df866c538ff098baa210b407b822818a415a6e7e Allow the V5 bulkstat ioctl to return information about metadata directory files so that xfs_scrub can find and scrub them, since they are otherwise ordinary directories. (Metadata files of course require per-file scrub code and hence do not need exposure.) Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index a42c1a33..499bea4e 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -490,9 +490,17 @@ struct xfs_bulk_ireq { */ #define XFS_BULK_IREQ_NREXT64 (1U << 2) +/* + * Allow bulkstat to return information about metadata directories. This + * enables xfs_scrub to find them for scanning, as they are otherwise ordinary + * directories. + */ +#define XFS_BULK_IREQ_METADIR (1U << 3) + #define XFS_BULK_IREQ_FLAGS_ALL (XFS_BULK_IREQ_AGNO | \ XFS_BULK_IREQ_SPECIAL | \ - XFS_BULK_IREQ_NREXT64) + XFS_BULK_IREQ_NREXT64 | \ + XFS_BULK_IREQ_METADIR) /* Operate on the root directory inode. */ #define XFS_BULK_IREQ_SPECIAL_ROOT (1)