]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs: xfs_repair secondary sb verification regression test
authorBrian Foster <bfoster@redhat.com>
Thu, 12 Feb 2015 03:12:14 +0000 (14:12 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 12 Feb 2015 03:12:14 +0000 (14:12 +1100)
commited48b428c6ea26597e7367f8386a99775cc8fc59
treed573864a01831a680e90530294553cfb8c2148c7
parent4046dd9fc6b0d1e3e1e34b80b72dc00117c1a44a
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>
common/repair
tests/xfs/070 [new file with mode: 0755]
tests/xfs/070.out [new file with mode: 0644]
tests/xfs/group