xfs
[Top] [All Lists]

Re: Segmentation fault during xfs_repair

To: Richard Kolkovich <richard@xxxxxxxxxxxxx>
Subject: Re: Segmentation fault during xfs_repair
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sat, 06 Jun 2009 00:10:12 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4A29F415.5020203@xxxxxxxxxxx>
References: <20090605222236.GA39825@xxxxxxxxxxxxxxxxxxxxxx> <4A29F415.5020203@xxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
Eric Sandeen wrote:

> I'll have to ponder what repair should do in this case ... and I'll see
> if there's something we can do in xfs_db to just whack out this problem
> and let repair continue for now.
>
> -Eric
>
>   
This should get you over that hump I think:


--- xfsprogs-3.0.1.orig/repair/dir2.c   2009-06-06 00:01:10.711081870 -0500
+++ xfsprogs-3.0.1/repair/dir2.c        2009-06-06 00:05:52.993365954 -0500
@@ -353,6 +353,14 @@
                        }
                }
 
+               if (i >= XFS_DA_NODE_MAXDEPTH) {
+                       do_warn(_("bad header depth for directory inode 
%llu\n"),
+                               da_cursor->ino);
+                       da_brelse(bp);
+                       i = -1;
+                       goto error_out;
+               }
+
                da_cursor->level[i].hashval =
                                        be32_to_cpu(node->btree[0].hashval);
                da_cursor->level[i].bp = bp;


but I have to say, that is one fried filesystem you've got there....

-Eric

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