From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: "Dâniel Fraga" <fragabr@gmail.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: Kernel 3.7.0: bad header/extent
Date: Sun, 16 Dec 2012 09:50:13 -0500 [thread overview]
Message-ID: <20121216145013.GA5098@thunk.org> (raw)
In-Reply-To: <75A902DB-8A60-4CF5-982A-C32C5AB83C27@dilger.ca>
On Sat, Dec 15, 2012 at 11:08:34PM -0700, Andreas Dilger wrote:
> > debugfs 1.41.12 (17-May-2010)
> > Level Entries Logical Physical Length Flags
> > 0/ 0 1/ 1 0 - 4294967295 37333026 - 4332300321 0
>
> This is interesting. The one extent reports it is valid for 2^32-1
> blocks, but this isn't possible with the current on-disk extent
> format. It looks like the extent is actually storing "-1" blocks
> (which is also invalid) but is incorrectly sign extended to
> 0xffffffff.
Actuually, the number of blocks in the extent was set to 0. The
number reported by e2fsprogs contains is the inclusive range (i.e.,
lblk, lblk+len-1).
A fix for this was added to e2fsprogs in v1.42.2 in March 2012, by
commit 26c09eb8145a1 ("e2fsck: check for zero length extent"). There
was a regression which this commit would sometimes trigger which was
fixed in v1.42.4 (commit 9c40d14841f0, "e2fsck: only check for
zero-length leaf extents"). So e2fsck 1.42.4 or newer is recommended
to repair this sort of file system corruption.
> > Ok. The problem is that I'm trapped. I need to compile the most
> > recent version (1.42.6) but the needed file to
> > compile (/usr/include/dlfcn.h) isn't available (Input/output error)
> > because of this problem.
What I would suggest that you do is to zap the bad inode and then run
e2fsck to repair the resulting damage:
debugfs -w -R "clri <9311628>" /dev/sda2
e2fsck -fy /dev/sda2
Then reinstall the glibc package (libc6-dev if you are using a
Debian-derived distribution), which supplies dlfcn.h, and then
recompile e2fsprogs so you can install a 1.42.x version of e2fsprogs.
I'm not entirely sure how the inode had gotten corrupted in the first
place, but I would be surprised if it was due to upgrading the kernel
from 3.6 to 3.7. If you do see this corruption again, please let us
know, and hopefully we can try to figure out what the root cause of
the issue might be.
Regards,
- Ted
next prev parent reply other threads:[~2012-12-16 14:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-15 20:44 Kernel 3.7.0: bad header/extent Dâniel Fraga
2012-12-16 2:27 ` Theodore Ts'o
2012-12-16 3:00 ` Dâniel Fraga
2012-12-16 3:51 ` Theodore Ts'o
2012-12-16 5:39 ` Dâniel Fraga
2012-12-16 6:08 ` Andreas Dilger
2012-12-16 14:50 ` Theodore Ts'o [this message]
2012-12-16 23:52 ` Dâniel Fraga
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=20121216145013.GA5098@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=fragabr@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).