| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH V2] xfs_repair: print superblock offsets and why they can't be verified |
| From: | KELEMEN Peter <Peter.Kelemen@xxxxxxx> |
| Date: | Thu, 23 Oct 2008 01:41:28 +0200 |
| In-reply-to: | <20081022183636.GE20550@kyra> |
| Mail-followup-to: | xfs@xxxxxxxxxxx |
| Organization: | CERN European Laboratory for Particle Physics, Switzerland |
| References: | <20081022183636.GE20550@kyra> |
| User-agent: | Mutt/1.5.17+20080114 (2008-01-14) |
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...
Signed-off-by: KELEMEN Peter <Peter.Kelemen@xxxxxxx>
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);
}
}
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: 2.6.27.[0,2] problems (v. 2.6.26.5): Samba & root-read-only, Dave Chinner |
|---|---|
| Next by Date: | TAKE 987246 - Can't lock inodes in radix tree preload region, Lachlan McIlroy |
| Previous by Thread: | [PATCH] xfs_repair: print superblock offsets and denial reasons, KELEMEN Peter |
| Next by Thread: | Re: [PATCH V2] xfs_repair: print superblock offsets and why they can't be verified, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |