xfs
[Top] [All Lists]

Re: [PATCH 3/3] repair: compare superblock / AG headers fields against m

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/3] repair: compare superblock / AG headers fields against manual counts
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 31 Dec 2009 09:43:14 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20091201151037.707510379@xxxxxxxxxxxxxxxxxxxxxx>
References: <20091201150503.958283878@xxxxxxxxxxxxxxxxxxxxxx> <20091201151037.707510379@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
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@xxxxxx>
.....
> @@ -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@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>