From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>,
Allison Henderson <allison.henderson@oracle.com>,
Chandan Babu R <chandanrlinux@gmail.com>,
Catherine Hoang <catherine.hoang@oracle.com>,
djwong@kernel.org
Cc: xfs <linux-xfs@vger.kernel.org>,
greg.marsden@oracle.com, shirley.ma@oracle.com,
konrad.wilk@oracle.com,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Matthew Wilcox <willy@infradead.org>,
tpkelly@eecs.umich.edu, smahar@ucsd.edu,
Christoph Hellwig <hch@infradead.org>,
fstests <fstests@vger.kernel.org>, Zorro Lang <zlang@redhat.com>,
Carlos Maiolino <cmaiolino@redhat.com>
Subject: [NYE DELUGE 2/4] xfs: online repair in its entirety
Date: Fri, 30 Dec 2022 13:14:05 -0800 [thread overview]
Message-ID: <Y69Unb7KRM5awJoV@magnolia> (raw)
Hi everyone,
As I've mentioned several times throughout 2022, I would like to merge
the online fsck feature in time for the 2023 LTS kernel. This is the
second part of that effort.
This deluge contains all of the online repair kernel code, a significant
amount of restructuring of how repairs work in the userspace driver
program, and a ton of fstests updates to provide automated fuzz testing
and stress testing of forced repairs.
Within the kernel section, the major pieces are the use of tmpfs files
to provide pageable kernel memory for staging repair information;
lightweight hooks into the main xfs filesystem for scrub via jump
labels; coordinated inode scans for live index construction; and the
atomic file mapping swap feature.
Changes to the userspace driver program fall into two main categories:
restructuring how repairs are scheduled so that they're tracked by inode
or AG; establishing data dependency chains so that we scan and repair
things in the correct order; and reworking the systemd background
services to be more secure, enable periodic media scans, and provide
some semblance of fs corruption reporting.
The fstests changes are a substantial reworking of the fuzzing code to
fit the testing described in the design documentation; adding stress
testing of online repairs vs. fsstress; and functional tests for all the
new features that ride in with online repair.
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. While there are usually valid
arguments for performing such cleanups, those are separate tasks to be
prioritized separately. I will get to them after merging online fsck,
because revising existing subsystems generally involves rebasing work
in this patchset, which means the affected patches need re-reviewing.
Unless it's absolutely necessary, this just creates more work for
everybody.
I've been running daily online **repairs** of every computer I own for
the last eight months. All modifications so far have been to optimize
data structures (holes in the xattr structures, excessively large rmap
btrees, and bugs in quota resource counter updates). So far, no damage
has resulted from these operations. All issues observed in that time
have been corrected in this submission.
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 100 million repairs with zero problems observed.
(For comparison, the long soak fsx test recently passed 92 billion file
operations, so online fsck has a ways to go...)
As a warning, the patches will likely take several days to trickle in.
While everyone else looks at this, I plan to prototype directory tree
reconstruction with Allison's parent pointers v27 patchset. Having a
user of that functionality is (I think) the last major hurdle to
ensuring that parent pointers are a good fit for the problems that need
solving, which in turn is the last requirement for merging that feature.
--D
next reply other threads:[~2022-12-30 21:14 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 21:14 Darrick J. Wong [this message]
2022-12-30 22:12 ` [PATCHSET v24.0 0/7] xfs: stage repair information in pageable memory Darrick J. Wong
2022-12-30 22:12 ` [PATCH 2/7] xfs: enable sorting of xfile-backed arrays Darrick J. Wong
2022-12-30 22:12 ` [PATCH 6/7] xfs: cache pages used for xfarray quicksort convergence Darrick J. Wong
2022-12-30 22:12 ` [PATCH 7/7] xfs: improve xfarray quicksort pivot Darrick J. Wong
2022-12-30 22:12 ` [PATCH 4/7] xfs: teach xfile to pass back direct-map pages to caller Darrick J. Wong
2022-12-30 22:12 ` [PATCH 3/7] xfs: convert xfarray insertion sort to heapsort using scratchpad memory Darrick J. Wong
2022-12-30 22:12 ` [PATCH 5/7] xfs: speed up xfarray sort by sorting xfile page contents directly Darrick J. Wong
2022-12-30 22:12 ` [PATCH 1/7] xfs: create a big array data structure Darrick J. Wong
2022-12-30 22:13 ` [PATCHSET v24.0 0/7] xfs: support in-memory btrees Darrick J. Wong
2022-12-30 22:13 ` [PATCH 1/7] xfs: dump xfiles for debugging purposes Darrick J. Wong
2022-12-30 22:13 ` [PATCH 6/7] xfs: support in-memory btrees Darrick J. Wong
2022-12-30 22:13 ` [PATCH 2/7] xfs: teach buftargs to maintain their own buffer hashtable Darrick J. Wong
2022-12-30 22:13 ` [PATCH 5/7] xfs: consolidate btree block allocation tracepoints Darrick J. Wong
2022-12-30 22:13 ` [PATCH 4/7] xfs: consolidate btree block freeing tracepoints Darrick J. Wong
2022-12-30 22:13 ` [PATCH 3/7] xfs: support in-memory buffer cache targets Darrick J. Wong
2022-12-30 22:13 ` [PATCH 7/7] xfs: connect in-memory btrees to xfiles Darrick J. Wong
2022-12-30 22:13 ` [PATCHSET v24.0 00/21] xfs: atomic file updates Darrick J. Wong
2022-12-30 22:13 ` [PATCH 05/21] xfs: create a log incompat flag for atomic extent swapping Darrick J. Wong
2022-12-30 22:13 ` [PATCH 03/21] xfs: refactor non-power-of-two alignment checks Darrick J. Wong
2022-12-30 22:13 ` [PATCH 01/21] vfs: introduce new file range exchange ioctl Darrick J. Wong
2022-12-30 22:13 ` [PATCH 04/21] xfs: parameterize all the incompat log feature helpers Darrick J. Wong
2022-12-30 22:13 ` [PATCH 02/21] xfs: create a new helper to return a file's allocation unit Darrick J. Wong
2022-12-30 22:13 ` [PATCH 10/21] xfs: add error injection to test swapext recovery Darrick J. Wong
2022-12-30 22:13 ` [PATCH 06/21] xfs: introduce a swap-extent log intent item Darrick J. Wong
2022-12-30 22:13 ` [PATCH 07/21] xfs: create deferred log items for extent swapping Darrick J. Wong
2022-12-30 22:13 ` [PATCH 11/21] xfs: port xfs_swap_extents_rmap to our new code Darrick J. Wong
2022-12-30 22:13 ` [PATCH 09/21] xfs: add a ->xchg_file_range handler Darrick J. Wong
2022-12-30 22:13 ` [PATCH 08/21] xfs: enable xlog users to toggle atomic extent swapping Darrick J. Wong
2022-12-30 22:13 ` [PATCH 14/21] xfs: allow xfs_swap_range to use older extent swap algorithms Darrick J. Wong
2022-12-30 22:13 ` [PATCH 12/21] xfs: consolidate all of the xfs_swap_extent_forks code Darrick J. Wong
2022-12-30 22:13 ` [PATCH 15/21] xfs: remove old swap extents implementation Darrick J. Wong
2022-12-30 22:13 ` [PATCH 16/21] xfs: condense extended attributes after an atomic swap Darrick J. Wong
2022-12-30 22:13 ` [PATCH 17/21] xfs: condense directories " Darrick J. Wong
2022-12-30 22:13 ` [PATCH 18/21] xfs: condense symbolic links " Darrick J. Wong
2022-12-30 22:13 ` [PATCH 13/21] xfs: port xfs_swap_extent_forks to use xfs_swapext_req Darrick J. Wong
2022-12-30 22:13 ` [PATCH 21/21] xfs: enable atomic swapext feature Darrick J. Wong
2022-12-30 22:13 ` [PATCH 20/21] xfs: support non-power-of-two rtextsize with exchange-range Darrick J. Wong
2022-12-30 22:13 ` [PATCH 19/21] xfs: make atomic extent swapping support realtime files Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y69Unb7KRM5awJoV@magnolia \
--to=djwong@kernel.org \
--cc=allison.henderson@oracle.com \
--cc=catherine.hoang@oracle.com \
--cc=chandanrlinux@gmail.com \
--cc=cmaiolino@redhat.com \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=greg.marsden@oracle.com \
--cc=hch@infradead.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=shirley.ma@oracle.com \
--cc=smahar@ucsd.edu \
--cc=tpkelly@eecs.umich.edu \
--cc=willy@infradead.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).