]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_scrub: check file link counts
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 17:01:16 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:42 +0000 (11:37 -0700)
Check file link counts as part of checking a filesystem.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libfrog/scrub.c
man/man2/ioctl_xfs_scrub_metadata.2

index 53c47bc2b5dc62591319444173d8e40d45a7ede8..b6b8ae042c446ef2a476680c3c798c3922a02c68 100644 (file)
@@ -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. */
index 046e3e3657bb73f21536a0ab2a7403e7dcb66877..8e8bb72fb3bfedc187fcfc3e2079d5fe9d4be1cd 100644 (file)
@@ -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