[PATCHSET 2/2] xfs: LLM-inspired iunlink repair bug fixes
"Darrick J. Wong" <[email protected]>
| Newsgroups | org.kernel.vger.linux-xfs,org.kernel.vger.stable |
|---|---|
| Message-ID | <178460419438.830862.6755198157088208229.stgit@frogsfrogsfrogs> |
Hi all, These bugfixes got started as part of a series of assorted bug fixes. However, in writing a test case to exercise weird corruption scenarios I discovered a few more fixes, so I decided to collect them all in a targeted series. If you're going to start using this code, I strongly recommend pulling from my git trees, which are linked below. With a bit of luck, this should all go splendidly. 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=llm-fixes-iunlink --- Commits in this patchset: * xfs: hoist per-bucket unlinked list check to helper * xfs: don't livelock in scrub on a circular unlinked list * xfs: don't walk off the end of a null sc->sa.agi_bp in AGI repair * xfs: load next_agino from the correct xfarray in xrep_iunlink_relink_prev * xfs: pass runtime errors from xrep_iunlink_mark_ondisk_rec up to callers * xfs: check xfarray iteration errors when committing unlinked inode lists * xfs: fix allocated inodes that show up in the unlinked list * xfs: fix another iunlink infinite loop bug in online fsck * xfs: set the prev pointer when reinserting an inode on the unlinked list --- fs/xfs/scrub/trace.h | 2 + fs/xfs/scrub/agheader.c | 94 ++++++++++++++++++++++++++-------- fs/xfs/scrub/agheader_repair.c | 110 +++++++++++++++++++++++++++++++++++----- 3 files changed, 170 insertions(+), 36 deletions(-)