| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 09/13] xfs_repair: better checking of v5 attributes |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Wed, 9 Sep 2015 14:34:07 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1441827251-13128-1-git-send-email-sandeen@xxxxxxxxxxx> |
| References: | <1441827251-13128-1-git-send-email-sandeen@xxxxxxxxxxx> |
The commit:
0519f66 xfs_repair: better checking of v5 metadata fields
added new corruption checks to dir2.c but missed the similar
code in attr_repair.c; add that here.
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
---
repair/attr_repair.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/repair/attr_repair.c b/repair/attr_repair.c
index 2aafdf6..c8ba484 100644
--- a/repair/attr_repair.c
+++ b/repair/attr_repair.c
@@ -201,6 +201,15 @@ traverse_int_dablock(xfs_mount_t *mp,
goto error_out;
}
+ /* corrupt node; rebuild the dir. */
+ if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) {
+ libxfs_putbuf(bp);
+ do_warn(
+_("corrupt tree block %u for directory inode %" PRIu64 "\n"),
+ bno, da_cursor->ino);
+ goto error_out;
+ }
+
if (nodehdr.count > geo->node_ents) {
do_warn(_("bad record count in inode %" PRIu64 ", "
"count = %d, max = %d\n"),
--
1.7.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 05/13] xfs_repair: fix use-after-free in verify_final_dir2_path, Eric Sandeen |
|---|---|
| Next by Date: | [PATCH 08/13] xfs_repair: catch bad level/depth in da node, Eric Sandeen |
| Previous by Thread: | Re: [PATCH 05/13] xfs_repair: fix use-after-free in verify_final_dir2_path, Brian Foster |
| Next by Thread: | Re: [PATCH 09/13] xfs_repair: better checking of v5 attributes, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |