mbox series

[PATCHSET,v26.0,0/2] xfs: add usage counters for scrub

Message ID 169049623967.921701.643201943864960800.stgit@frogsfrogsfrogs (mailing list archive)
Headers show
Series xfs: add usage counters for scrub | expand

Message

Darrick J. Wong July 27, 2023, 10:19 p.m. UTC
Hi all,

This series introduces simple usage and performance counters for the
online fsck subsystem.  The goal here is to enable developers and
sysadmins to look at summary counts of how many objects were checked and
repaired; what the outcomes were; and how much time the kernel has spent
on these operations.  The counter file is exposed in debugfs because
that's easier than cramming it into the device model, and debugfs
doesn't have rules against complex file contents, unlike sysfs.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=scrub-usage-stats
---
 fs/xfs/Kconfig        |   17 ++
 fs/xfs/Makefile       |    1 
 fs/xfs/scrub/repair.c |   11 +
 fs/xfs/scrub/repair.h |    7 +
 fs/xfs/scrub/scrub.c  |   11 +
 fs/xfs/scrub/stats.c  |  405 +++++++++++++++++++++++++++++++++++++++++++++++++
 fs/xfs/scrub/stats.h  |   59 +++++++
 fs/xfs/xfs_linux.h    |    1 
 fs/xfs/xfs_mount.c    |    9 +
 fs/xfs/xfs_mount.h    |    4 
 fs/xfs/xfs_super.c    |   53 ++++++
 fs/xfs/xfs_super.h    |    2 
 12 files changed, 569 insertions(+), 11 deletions(-)
 create mode 100644 fs/xfs/scrub/stats.c
 create mode 100644 fs/xfs/scrub/stats.h

Comments

Dave Chinner Aug. 8, 2023, 7:09 a.m. UTC | #1
On Thu, Jul 27, 2023 at 03:19:19PM -0700, Darrick J. Wong wrote:
> Hi all,
> 
> This series introduces simple usage and performance counters for the
> online fsck subsystem.  The goal here is to enable developers and
> sysadmins to look at summary counts of how many objects were checked and
> repaired; what the outcomes were; and how much time the kernel has spent
> on these operations.  The counter file is exposed in debugfs because
> that's easier than cramming it into the device model, and debugfs
> doesn't have rules against complex file contents, unlike sysfs.

I wish we could just put these in sysfs with all the other per-mount
stats files we have. It's just stupid to have to put them somewhere
else because we want to put all the stats in a single file and so
grab them with a single read operation...


Other than that, this series looks fine.

Reviewed-by: Dave Chinner <dchinner@redhat.com>