public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v29.2 3/7] xfs: online repair of quota counters
@ 2024-01-30  5:03 Darrick J. Wong
  2024-01-30  5:06 ` [PATCH 1/8] xfs: report the health of quota counts Darrick J. Wong
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Darrick J. Wong @ 2024-01-30  5:03 UTC (permalink / raw)
  To: djwong; +Cc: Christoph Hellwig, linux-xfs, hch

Hi all,

This series uses the inode scanner and live update hook functionality
introduced in the last patchset to implement quotacheck on a live
filesystem.  The quotacheck scrubber builds an incore copy of the
dquot resource usage counters and compares it to the live dquots to
report discrepancies.

If the user chooses to repair the quota counters, the repair function
visits each incore dquot to update the counts from the live information.
The live update hooks are key to keeping the incore copy up to date.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  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=repair-quotacheck

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=repair-quotacheck

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=repair-quotacheck
---
Commits in this patchset:
 * xfs: report the health of quota counts
 * xfs: create a xchk_trans_alloc_empty helper for scrub
 * xfs: create a helper to count per-device inode block usage
 * xfs: create a sparse load xfarray function
 * xfs: implement live quotacheck inode scan
 * xfs: track quota updates during live quotacheck
 * xfs: repair cannot update the summary counters when logging quota flags
 * xfs: repair dquots based on live quotacheck results
---
 fs/xfs/Makefile                  |    2 
 fs/xfs/libxfs/xfs_fs.h           |    4 
 fs/xfs/libxfs/xfs_health.h       |    4 
 fs/xfs/scrub/common.c            |   49 ++
 fs/xfs/scrub/common.h            |   11 
 fs/xfs/scrub/fscounters.c        |    2 
 fs/xfs/scrub/health.c            |    1 
 fs/xfs/scrub/quotacheck.c        |  867 ++++++++++++++++++++++++++++++++++++++
 fs/xfs/scrub/quotacheck.h        |   76 +++
 fs/xfs/scrub/quotacheck_repair.c |  261 +++++++++++
 fs/xfs/scrub/repair.c            |   46 ++
 fs/xfs/scrub/repair.h            |    5 
 fs/xfs/scrub/scrub.c             |    9 
 fs/xfs/scrub/scrub.h             |   10 
 fs/xfs/scrub/stats.c             |    1 
 fs/xfs/scrub/trace.h             |   30 +
 fs/xfs/scrub/xfarray.h           |   19 +
 fs/xfs/xfs_health.c              |    1 
 fs/xfs/xfs_inode.c               |   16 +
 fs/xfs/xfs_inode.h               |    2 
 fs/xfs/xfs_qm.c                  |   23 +
 fs/xfs/xfs_qm.h                  |   16 +
 fs/xfs/xfs_qm_bhv.c              |    1 
 fs/xfs/xfs_quota.h               |   45 ++
 fs/xfs/xfs_trans_dquot.c         |  158 +++++++
 25 files changed, 1633 insertions(+), 26 deletions(-)
 create mode 100644 fs/xfs/scrub/quotacheck.c
 create mode 100644 fs/xfs/scrub/quotacheck.h
 create mode 100644 fs/xfs/scrub/quotacheck_repair.c


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-01-30  8:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30  5:03 [PATCHSET v29.2 3/7] xfs: online repair of quota counters Darrick J. Wong
2024-01-30  5:06 ` [PATCH 1/8] xfs: report the health of quota counts Darrick J. Wong
2024-01-30  5:06 ` [PATCH 2/8] xfs: create a xchk_trans_alloc_empty helper for scrub Darrick J. Wong
2024-01-30  8:16   ` Christoph Hellwig
2024-01-30  5:06 ` [PATCH 3/8] xfs: create a helper to count per-device inode block usage Darrick J. Wong
2024-01-30  8:16   ` Christoph Hellwig
2024-01-30  5:07 ` [PATCH 4/8] xfs: create a sparse load xfarray function Darrick J. Wong
2024-01-30  8:17   ` Christoph Hellwig
2024-01-30  5:07 ` [PATCH 5/8] xfs: implement live quotacheck inode scan Darrick J. Wong
2024-01-30  8:17   ` Christoph Hellwig
2024-01-30  5:07 ` [PATCH 6/8] xfs: track quota updates during live quotacheck Darrick J. Wong
2024-01-30  5:07 ` [PATCH 7/8] xfs: repair cannot update the summary counters when logging quota flags Darrick J. Wong
2024-01-30  8:18   ` Christoph Hellwig
2024-01-30  5:08 ` [PATCH 8/8] xfs: repair dquots based on live quotacheck results Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox