xfs: track usage statistics of online fsck
authorDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:07 +0000 (07:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:07 +0000 (07:48 -0700)
commitd7a74cad8f45133935c59ed0adf949f85238624b
tree5dd6fcb518271d2200137622ece40e2050935dd9
parenta76dba3b248cb0c2b93d66f463d5ca3cf7037d28
xfs: track usage statistics of online fsck

Track the usage, outcomes, and run times of the online fsck code, and
report these values via debugfs.  The columns in the file are:

 * scrubber name

 * number of scrub invocations
 * clean objects found
 * corruptions found
 * optimizations found
 * cross referencing failures
 * inconsistencies found during cross referencing
 * incomplete scrubs
 * warnings
 * number of time scrub had to retry
 * cumulative amount of time spent scrubbing (microseconds)

 * number of repair inovcations
 * successfully repaired objects
 * cumuluative amount of time spent repairing (microseconds)

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/Kconfig
fs/xfs/Makefile
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/stats.c [new file with mode: 0644]
fs/xfs/scrub/stats.h [new file with mode: 0644]
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_super.c