[MEGAPATCHSET v26] xfs: online repair, part of part 1

Darrick J. Wong
2023-07-27T22:12:03Z

Hi everyone,

I've rebased the online fsck development branches atop 6.5, applied the
changes requested during the review of v25, and cleaned up the common
code as needed to make online fsck part 2 work more smoothly. Part 2
has also grown a directory tree structure checker that can find and fix
un-tree like things. I also added some simple performance counters that
are accessible via debugfs.

In other words, I'm formally submitting part 1 for inclusion in 6.6.

For this review, I would like people to focus the following:

- Are the major subsystems sufficiently documented that you could figure
out what the code does?

- Do you see any problems that are severe enough to cause long term
support hassles? (e.g. bad API design, writing weird metadata to disk)

- Can you spot mis-interactions between the subsystems?

- What were my blind spots in devising this feature?

- Are there missing pieces that you'd like to help build?

- Can I just merge all of this?

The one thing that is /not/ in scope for this review are requests for
more refactoring of existing subsystems.

I've been running daily online **repairs** of every computer I own for
the last 16 months. So far, no damage has resulted from these
operations.

Fuzz and stress testing of online repairs have been running well for a
year now. As of this writing, online repair can fix slightly more
things than offline repair, and the fsstress+repair long soak test has
passed 250 million repairs with zero problems observed. All issues
observed in that time have been corrected in this submission.

(For comparison, the long soak fsx test recently passed 103 billion file
operations with only one corruption reported, so online fsck has a ways
to go...)

This is actually an excerpt of the full megapatchset -- I'm only sending
about 51 patches from the kernel branch, which is enough to rebuild the
space management btrees that don't require special effort. I've left
for another day the remaining ~400 patches in part 1.

--D