summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_fs.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-11-03 20:18:54 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-11-05 13:38:32 -0800
commitdf866c538ff098baa210b407b822818a415a6e7e (patch)
tree1924d2ff8a19b3f8b85fab0db23b681a21c73858 /fs/xfs/libxfs/xfs_fs.h
parent688828d8f8cdf8b1b917de938a1ce86a93fdbba9 (diff)
downloadlwn-df866c538ff098baa210b407b822818a415a6e7e.tar.gz
lwn-df866c538ff098baa210b407b822818a415a6e7e.zip
xfs: allow bulkstat to return metadata directories
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 <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_fs.h')
-rw-r--r--fs/xfs/libxfs/xfs_fs.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h
index a42c1a33691c..499bea4ea806 100644
--- a/fs/xfs/libxfs/xfs_fs.h
+++ b/fs/xfs/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)