linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: How should e2fsck clear s_errno/j_errno on an ro mount?
Date: Fri, 20 Jul 2012 20:39:53 -0400	[thread overview]
Message-ID: <20120721003953.GA9399@thunk.org> (raw)
In-Reply-To: <5009E62E.3020608@redhat.com>

On Fri, Jul 20, 2012 at 06:13:50PM -0500, Eric Sandeen wrote:
> I'm looking at a situation where a root filesystem encountered an error and shut down, and therefore the error was stored in the journal.
> 
> But for the root fs, it seems that nothing can clear it.
> 
> If we do e2fsck -fy on a readonly mounted filesystem, then remount,rw the error persists:
> 
> [25124.319387] EXT4-fs warning (device loop3): ext4_clear_journal_err:4281: Filesystem error recorded from previous mount: IO failure
> [25124.331140] EXT4-fs warning (device loop3): ext4_clear_journal_err:4282: Marking fs in need of filesystem check.
> 
> ad infinitum.
> 
> It may be my fever-addled brain this week but I'm having a hard time following how this error is supposed to get set & cleared, especially if e2fsck has modified it while mounted ro.
> 
> As soon as I mount rw again, load_superblock() sees the journal superblock has an error set, and copies it back into the journal->j_errno.
> 
> After Ted's "e2fsck: correctly propagate error from journal to superblock" in e2fsprogs, at least an unmounted fs gets cleaned up, but I'm not sure what to do to fix this when it's mounted.  

The problem you describe should have been fixed by commit 6d75685e:
e2fsck: handle an already recovered journal with a non-zero s_error
field, which is in e2fsprogs 1.42.4.

					- Ted

  reply	other threads:[~2012-07-21  0:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 23:13 How should e2fsck clear s_errno/j_errno on an ro mount? Eric Sandeen
2012-07-21  0:39 ` Theodore Ts'o [this message]
2012-07-23 16:28   ` Eric Sandeen
2012-07-23 19:14     ` Theodore Ts'o
2012-07-23 20:21       ` Eric Sandeen
2012-07-29  3:51         ` Theodore Ts'o
2012-07-29  3:52           ` [PATCH] ext4: make sure the journal sb is written in ext4_clear_journal_err() Theodore Ts'o
2012-07-29  4:13           ` [PATCH] Revert "e2fsck: Skip journal checks if the fs is mounted and doesn't need recovery" Theodore Ts'o
2012-07-29  4:19             ` [PATCH] e2fsck: check a file system mounted read-only if forced Theodore Ts'o

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=20120721003953.GA9399@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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).