From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: Why clear the orphan list when mounting a fs with errors?
Date: Mon, 27 Aug 2012 14:12:05 -0500 [thread overview]
Message-ID: <503BC685.7090707@redhat.com> (raw)
in ext3_orphan_cleanup (same for ext4) we do:
if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
if (es->s_last_orphan)
jbd_debug(1, "Errors on filesystem, "
"clearing orphan list.\n");
es->s_last_orphan = 0;
jbd_debug(1, "Skipping orphan recovery on fs with errors.\n");
return;
}
I can sort of understand not processing the orphan inode list if the
fs is already known to be potentially corrupted, but actually clearing
the list seems to go too far. This means that a subsequent e2fsck
will find even more problems as a result of the orphan list not being
available.
It's been this way for a while though, so the original reason for the
behavior may be lost. Does anyone know?
I've been alerted to a somewhat odd behavior where a filesystem with
an orphan inode list *and* in error state behaves differently if:
1) e2fsck -p is done: e2fsck fixes things and exits happily
vs.
2) mount is done first, then e2fsck -p: due to the orphan inode
list being gone, enough errors are found that e2fsck exits with
UNEXPECTED INCONSISTENCY.
The 2nd case above has the tendency to halt the boot process, which
is unfortunate.
The situation might be improved by at least not clearing the orphan
inode list when the fs is mounted readonly. What do folks think?
Thanks,
-Eric
next reply other threads:[~2012-08-27 19:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 19:12 Eric Sandeen [this message]
2012-08-27 19:27 ` [PATCH, RFC] ext4: don't clear orphan list on ro mount with errors Eric Sandeen
2012-08-27 23:31 ` Andreas Dilger
2012-08-27 23:35 ` Eric Sandeen
2012-09-27 3:32 ` Theodore Ts'o
2012-09-27 4:32 ` Eric Sandeen
2012-08-27 19:30 ` [PATCH, RFC] ext3: " Eric Sandeen
2012-08-28 8:02 ` Jan Kara
2012-09-04 18:51 ` Eric Sandeen
2012-09-04 21:27 ` Jan Kara
2012-09-04 19:33 ` Why clear the orphan list when mounting a fs with errors? Eric Sandeen
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=503BC685.7090707@redhat.com \
--to=sandeen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.