From patchwork Sun Jul 29 04:13:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 173902 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E455C2C0079 for ; Sun, 29 Jul 2012 14:13:38 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751175Ab2G2ENh (ORCPT ); Sun, 29 Jul 2012 00:13:37 -0400 Received: from li9-11.members.linode.com ([67.18.176.11]:41887 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841Ab2G2ENg (ORCPT ); Sun, 29 Jul 2012 00:13:36 -0400 Received: from root (helo=closure.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.72) (envelope-from ) id 1SvKsm-0007qe-8E; Sun, 29 Jul 2012 04:13:32 +0000 Received: by closure.thunk.org (Postfix, from userid 15806) id 27AC22423C9; Sun, 29 Jul 2012 00:13:29 -0400 (EDT) From: Theodore Ts'o To: Ext4 Developers List Cc: sandeen@redhat.com, Theodore Ts'o 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 Message-Id: <1343535209-18588-1-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.7.12.rc0.22.gcdd159b In-Reply-To: <20120729035118.GA17210@thunk.org> References: <20120729035118.GA17210@thunk.org> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.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 Signed-off-by: "Theodore Ts'o" --- 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; - /* * Make sure the ext3 superblock fields are consistent. */ @@ -1475,7 +1471,6 @@ failure: } } -skip_journal: /* * Check for compatibility with the feature sets. We need to * be more stringent than ext2fs_open().