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:
Brian Foster
2015-02-12 14:12:14 +11:00
committed by Dave Chinner
parent 4046dd9fc6
commit ed48b428c6
4 changed files with 142 additions and 0 deletions
+1
View File
@@ -67,6 +67,7 @@
067 acl attr auto quick
068 auto stress dump
069 ioctl auto quick
070 auto quick repair
071 rw auto
072 rw auto prealloc quick
073 copy auto