mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
ed48b428c6
The secondary superblock verification in xfs_repair was subject to a bug that unnecessarily leads to a brute force superblock scan if the last superblock in the fs happens to be corrupt. Normally, xfs_repair handles one-off superblock corruption gracefully using a heuristic that finds the most consistent superblock content across the set of secondary superblocks. Create a regression test for xfs_repair that corrupts the last superblock in the fs. Verify the superblock is updated from the previously verified sb content and a brute force scan is not initiated. In the event of failure, detect that a brute force scan has started and abort the repair in order to fail the test quickly. To support the test, extend the xfs_repair filter to handle corrupted superblock repair output and provide generic test output for arbitrary AG counts. Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
QA output created by 070
|
|
Phase 1 - find and verify superblock...
|
|
Phase 2 - using <TYPEOF> log
|
|
- zero log...
|
|
- scan filesystem freespace and inode maps...
|
|
bad magic number
|
|
bad on-disk superblock AGNO - bad magic number
|
|
primary/secondary superblock AGNO conflict - AG superblock geometry info conflicts with filesystem geometry
|
|
zeroing unused portion of secondary superblock (AG #AGNO)
|
|
reset bad sb for ag AGNO
|
|
- found root inode chunk
|
|
Phase 3 - for each AG...
|
|
- scan and clear agi unlinked lists...
|
|
- process known inodes and perform inode discovery...
|
|
- process newly discovered inodes...
|
|
Phase 4 - check for duplicate blocks...
|
|
- setting up duplicate extent list...
|
|
- check for inodes claiming duplicate blocks...
|
|
Phase 5 - rebuild AG headers and trees...
|
|
- reset superblock...
|
|
Phase 6 - check inode connectivity...
|
|
- resetting contents of realtime bitmap and summary inodes
|
|
- traversing filesystem ...
|
|
- traversal finished ...
|
|
- moving disconnected inodes to lost+found ...
|
|
Phase 7 - verify and correct link counts...
|
|
done
|