linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: sandeen@redhat.com, Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH] Revert "e2fsck: Skip journal checks if the fs is mounted and doesn't need recovery"
Date: Sun, 29 Jul 2012 00:13:29 -0400	[thread overview]
Message-ID: <1343535209-18588-1-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <20120729035118.GA17210@thunk.org>

This reverts commit 47c1b8e16668daa6e74cee3c7b8bdf237ffefe70.

The original reason for this commit was to speed up boots for hard
drives.  However, I've measured the time difference on a 1TB laptop
drive, and it's not significant: 70ms vs 10ms when running e2fsck on a
clean file system.

The problem with this optimization is that we don't notice if the
journal superblock has a non-zero s_errno field.  If we don't transfer
the error indicator from the journal superblock to the file system
superblock, then the kernel will transfer it when the file system is
remounted read-write, causing scary messages to appear in the syslog.
(And since there was a bug in the kernel code which didn't clear the
error indicator in the journal superblock, it would never get
cleared.)

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 e2fsck/unix.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 94260bd..f71a125 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1424,10 +1424,6 @@ failure:
 		fprintf(ctx->logf, "Filesystem UUID: %s\n",
 			e2p_uuid2str(sb->s_uuid));
 
-	if ((ctx->mount_flags & EXT2_MF_MOUNTED) &&
-	    !(sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER))
-		goto skip_journal;

  parent reply	other threads:[~2012-07-29  4:13 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
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           ` Theodore Ts'o [this message]
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=1343535209-18588-1-git-send-email-tytso@mit.edu \
    --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).