]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: further improvement on secondary superblock search method
authorBill O'Donnell <billodo@redhat.com>
Fri, 3 Jun 2016 01:04:03 +0000 (11:04 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 3 Jun 2016 01:04:03 +0000 (11:04 +1000)
commitef12e07674ce8e8549a10bbdcb8b3377d430fa0a
tree95fe79026fb6f84d082ba09d6d66fdbf9bd3c2e1
parentce211a6ce415f9b2c341613c5a72c004d5ed76f2
xfs_repair: further improvement on secondary superblock search method

This patch is a further optimization of secondary sb search, in
order to handle non-default geometries. Once again, use a similar
method to find fs geometry as that of xfs_mkfs. Refactor
verify_sb(), creating new sub-function that checks sanity of
agblocks and agcount: verify_sb_blocksize().

If verify_sb_blocksize verifies sane paramters, use found values for
the sb search. Otherwise, try search with default values. If these
faster methods both fail, fall back to original brute force slower
search.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/sb.c