xfs
[Top] [All Lists]

Re: [PATCH V2] xfs_repair: print superblock offsets and why they can't b

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH V2] xfs_repair: print superblock offsets and why they can't be verified
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Fri, 21 Nov 2008 12:03:36 +1100
In-reply-to: <490081C6.1030301@xxxxxxxxxxx>
Organization: SGI
References: <20081022183636.GE20550@kyra> <20081022234128.GC4395@kyra> <490081C6.1030301@xxxxxxxxxxx>
User-agent: Opera Mail/9.52 (Win32)
On Fri, 24 Oct 2008 00:53:10 +1100, Eric Sandeen <sandeen@xxxxxxxxxxx> wrote:

KELEMEN Peter wrote:
Eric has pointed out that verify_set_primary_sb() will either
return 1 or XR_INSUFF_SEC_SB.  Move the check lower into
verify_set_primary_sb() by checking the return value of
verify_sb().  Example output:

found candidate secondary superblock...
verifying sb at 31249334272: bad magic number (1)
verifying sb at 62498668544: bad magic number (1)
verifying sb at 93748002816: bad magic number (1)
verifying sb at 124997337088: bad magic number (1)
unable to verify superblock, continuing...


This looks better :)  You may want to add even more info...

while it's just searching block by block, if it finds a candidate, I'd
print the sector offset for that candidate (your first output line).

And rather than "verifying sb at..." you might do something like
"comparing to sb N at offset X":

+       } else {
+               do_warn("comparing with sb %d at sector %Lu failed: %s (%d)\n",
+                       agno, off, err_string(reason), reason);

because at this point it's using the geometry of the candidate sb to see
if it can be used to find enough other valid sb's....

Do I check in the patch as is or will there be an update?

Regards,
Barry.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH V2] xfs_repair: print superblock offsets and why they can't be verified, Barry Naujok <=