mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: xfs_repair secondary sb verification regression test
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>
This commit is contained in:
committed by
Dave Chinner
parent
4046dd9fc6
commit
ed48b428c6
@@ -88,6 +88,10 @@ s/(inode chunk) (\d+)\/(\d+)/AGNO\/INO/;
|
||||
# sunit/swidth reset messages
|
||||
s/^(Note - .*) were copied.*/\1 fields have been reset./;
|
||||
s/^(Please) reset (with .*) if necessary/\1 set \2/;
|
||||
# corrupt sb messages
|
||||
s/(superblock) (\d+)/\1 AGNO/;
|
||||
s/(AG \#)(\d+)/\1AGNO/;
|
||||
s/(reset bad sb for ag) (\d+)/\1 AGNO/;
|
||||
print;'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user