[PATCH 3/3] repair: compare superblock / AG headers fields against manual counts
Dave Chinner
david at fromorbit.com
Wed Dec 30 16:43:14 CST 2009
On Tue, Dec 01, 2009 at 10:05:06AM -0500, Christoph Hellwig wrote:
> Compare the free block / inode counters in the superblock and AG headers
> against the values we get from a manual btree traversal. Ported over from
> xfs_db to get the same amount of superblock / AG header checking as in
> xfs_check.
>
>
> Note: this causes additional output in the xfstests 030 and 178 which will need
> some adjustments in the testcases.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
.....
> @@ -550,6 +583,10 @@ _("%s freespace btree block claimed (sta
> lastblock = b;
> }
> } else {
> + fdblocks += len;
> + agffreeblks += len;
> + if (len > agflongest)
> + agflongest = len;
> if (len < lastcount) {
> do_warn(_(
> "out-of-order cnt btree record %d (%u %u) block %u/%u\n"),
Might be worth a comment here saying that we are only calculating
totals from the ABTC btree scan. OTOH, is is worth checking that the
two btrees add up to the same number of free blocks, same maximum
length extent, etc?
Otherwise looks good.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list