From: Darrick J. Wong <djwong@xxxxxxxxxx> Check file link counts as part of checking a filesystem. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> --- libfrog/scrub.c | 5 +++++ man/man2/ioctl_xfs_scrub_metadata.2 | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/libfrog/scrub.c b/libfrog/scrub.c index 53c47bc2b..b6b8ae042 100644 --- a/libfrog/scrub.c +++ b/libfrog/scrub.c @@ -139,6 +139,11 @@ const struct xfrog_scrub_descr xfrog_scrubbers[XFS_SCRUB_TYPE_NR] = { .descr = "quota counters", .group = XFROG_SCRUB_GROUP_ISCAN, }, + [XFS_SCRUB_TYPE_NLINKS] = { + .name = "nlinks", + .descr = "inode link counts", + .group = XFROG_SCRUB_GROUP_ISCAN, + }, }; /* Invoke the scrub ioctl. Returns zero or negative error code. */ diff --git a/man/man2/ioctl_xfs_scrub_metadata.2 b/man/man2/ioctl_xfs_scrub_metadata.2 index 046e3e365..8e8bb72fb 100644 --- a/man/man2/ioctl_xfs_scrub_metadata.2 +++ b/man/man2/ioctl_xfs_scrub_metadata.2 @@ -164,6 +164,10 @@ Examine all user, group, or project quota records for corruption. .B XFS_SCRUB_TYPE_FSCOUNTERS Examine all filesystem summary counters (free blocks, inode count, free inode count) for errors. + +.TP +.B XFS_SCRUB_TYPE_NLINKS +Scan all inodes in the filesystem to verify each file's link count. .RE .PD 1