[PATCHSET v3 1/2] xfs: LLM-inspired bug fixes, part 1
"Darrick J. Wong" <[email protected]>
| Newsgroups | org.kernel.vger.linux-xfs,org.kernel.vger.stable |
|---|---|
| Message-ID | <178400716321.267810.14342805775513660564.stgit@frogsfrogsfrogs> |
Hi all,
Someone gave me a pretty generous license for a large language model, so
I pointed it at every single file under fs/xfs and told it to find bugs.
After personally filtering out the errors and garbage, here are fixes
for the real bugs that I think it found.
Most of these fixes target the online fsck code because I'm most
familiar with it, but the LLM will read other parts of the xfs codebase
so there are miscellaneous bug fixes.
I'm sending these out as smallish bundles of bug fixes. There's no
particular order or grouping.
v3: add rvb tags
v2: add debugging patch to make it easier to test new cow repair code,
move cow fork replacement function to xfs_bmap_util.c.
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-1
---
Commits in this patchset:
* xfs: don't replace the wrong part of the cow fork
* xfs: make cow repair somewhat flaky when debugging knob enabled
* xfs: move cow_replace_mapping to xfs_bmap_util.c
* xfs: don't wrap around quota ids in dqiterate
* xfs: use rtrefcount btree cursor in xchk_xref_is_rt_cow_staging
* xfs: use the rt version of the cow staging checker
* xfs: write the rg superblock when fixing it
* xfs: grab rtrmap btree when checking rgsuper
---
fs/xfs/scrub/trace.h | 35 ---------
fs/xfs/xfs_bmap_util.h | 4 +
fs/xfs/xfs_trace.h | 41 ++++++++++
fs/xfs/scrub/cow_repair.c | 179 ++++++++++++++++++++++-----------------------
fs/xfs/scrub/dqiterate.c | 2 -
fs/xfs/scrub/rgsuper.c | 14 +++-
fs/xfs/scrub/rtrefcount.c | 2 -
fs/xfs/scrub/rtrmap.c | 2 -
fs/xfs/xfs_bmap_util.c | 89 ++++++++++++++++++++++
9 files changed, 236 insertions(+), 132 deletions(-)