[Top] [All Lists]

Re: xfs_repair segfaults

To: Ole Tange <tange@xxxxxxxxxx>
Subject: Re: xfs_repair segfaults
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 12 Mar 2013 09:47:51 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CANU9nTkG_XrNhDjGfRBofJkz=KryDmLGGJnYsBXyH5Ng=uiRWg@xxxxxxxxxxxxxx>
References: <CANU9nTnvJS50vdQv2K0gKHZPvzzH5EY1qpizJNsqUobrr2juDA@xxxxxxxxxxxxxx> <512FA67D.2090708@xxxxxxxxxxx> <CANU9nTm3vR3Z5JwRwou4vnNejstAkAsnBb2ivwx-KhnHHbWpoQ@xxxxxxxxxxxxxx> <5130DB54.9030503@xxxxxxxxxxx> <CANU9nTkekrw2mdptFdK2RVUFXD=evt0sTZhB9VL+PKY8DTj11A@xxxxxxxxxxxxxx> <5134BBA4.3060305@xxxxxxxxxxx> <CANU9nTntXh5spRYc80OhsBqgLnZcJGA2qBeVVQaywthD1RMu4w@xxxxxxxxxxxxxx> <CANU9nTkG_XrNhDjGfRBofJkz=KryDmLGGJnYsBXyH5Ng=uiRWg@xxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130216 Thunderbird/17.0.3
On 3/12/13 6:37 AM, Ole Tange wrote:

> $ ~/work/xfsprogs/repair/xfs_repair -L franklin.img
> Phase 1 - find and verify superblock...
> Phase 2 - using internal log
>         - zero log...
> ALERT: The filesystem has valuable metadata changes in a log which is being
> destroyed because the -L option was used.
>         - scan filesystem freespace and inode maps...
> xfs_repair: scan.c:1080: scan_freelist: Assertion `0' failed.
> Aborted (core dumped)

Oh, man.  I need to have my hacker card revoked.  Or maybe focus
on one filesystem at a time so I don't keep doing dumb things, like
adding an unconditional ASSERT in non-"-n"-mode.  Holy cow, I don't
know what's up with me lately.  :/

Anyway, just modify these 2 lines in repair/scan.c to remove the ASSERT
around line 1080.

I'll send a proper patch as well.

diff --git a/repair/scan.c b/repair/scan.c
index 6a62dff..76bb7f1 100644
--- a/repair/scan.c
+++ b/repair/scan.c
@@ -1076,8 +1076,7 @@ scan_freelist(
                                  "freelist scan\n"), i);
-       } else /* should have been fixed in verify_set_agf() */
-               ASSERT(0);
+       }
        count = 0;
        for (;;) {

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