From: Eric Sandeen <sandeen@sandeen.net>
To: xfs@oss.sgi.com
Subject: Re: [PATCH V2] xfs_repair: print superblock offsets and why they can't be verified
Date: Thu, 23 Oct 2008 08:53:10 -0500 [thread overview]
Message-ID: <490081C6.1030301@sandeen.net> (raw)
In-Reply-To: <20081022234128.GC4395@kyra>
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....
-Eric
> Signed-off-by: KELEMEN Peter <Peter.Kelemen@cern.ch>
>
> Index: xfsprogs/repair/sb.c
> ===================================================================
> RCS file: /cvs/xfs-cmds/xfsprogs/repair/sb.c,v
> retrieving revision 1.22
> diff -u -u -r1.22 sb.c
> --- xfsprogs/repair/sb.c 8 Sep 2008 06:18:43 -0000 1.22
> +++ xfsprogs/repair/sb.c 22 Oct 2008 23:17:27 -0000
> @@ -683,6 +683,7 @@
> int num_ok;
> int retval;
> int round;
> + int reason; /* why the sb check failed */
>
> /*
> * select the number of secondaries to try for
> @@ -727,7 +728,7 @@
> goto out;
> }
>
> - if (verify_sb(sb, 0) == XR_OK) {
> + if ((reason = verify_sb(sb, 0)) == XR_OK) {
> /*
> * save away geometry info.
> * don't bother checking the sb
> @@ -740,6 +741,9 @@
> get_sb_geometry(&geo, sb);
> list = add_geo(list, &geo, agno);
> num_ok++;
> + } else {
> + do_warn("verifying sb at %Lu: %s (%d)\n",
> + off, err_string(reason), reason);
> }
> }
> }
>
>
next prev parent reply other threads:[~2008-10-23 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 18:36 [PATCH] xfs_repair: print superblock offsets and denial reasons KELEMEN Peter
2008-10-22 23:41 ` [PATCH V2] xfs_repair: print superblock offsets and why they can't be verified KELEMEN Peter
2008-10-23 13:53 ` Eric Sandeen [this message]
2008-10-23 14:24 ` Eric Sandeen
2008-11-21 1:03 ` Barry Naujok
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=490081C6.1030301@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.