[PATCHSET v29.0 27/40] xfs_scrub: improve warnings about difficult repairs

Darrick J. Wong
2023-12-31T19:46:44Z

Hi all,

While I was poking through the QA results for xfs_scrub, I noticed that
it doesn't warn the user when the primary and secondary realtime
metadata are so out of whack that the chances of a successful repair are
not so high. I decided that it was worth refactoring the scrub code a
bit so that we could warn the user about these types of things, and
ended up refactoring unnecessary helpers out of existence and fixing
other reporting gaps.

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

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=scrub-better-repair-warnings
---
man/man8/xfs_scrub.8 | 19 ++++++++++++++++++
scrub/common.c | 2 ++
scrub/phase1.c | 2 +-
scrub/phase2.c | 53 +++++++++++++++++++++++++++++++-------------------
scrub/phase3.c | 21 ++++++++++++++++----
scrub/phase4.c | 9 +++++---
scrub/phase5.c | 15 +++++++-------
scrub/repair.c | 47 ++++++++++++++++++++++++++++++++++----------
scrub/repair.h | 10 +++++++--
scrub/scrub.c | 52 +------------------------------------------------
scrub/scrub.h | 7 ++-----
scrub/xfs_scrub.c | 45 ++++++++++++++++++++++++++++++++++++++++++
scrub/xfs_scrub.h | 1 +
13 files changed, 175 insertions(+), 108 deletions(-)