Whamcloud - gitweb
Revert "e2fsck: Skip journal checks if the fs is mounted and doesn't need recovery"
authorTheodore Ts'o <tytso@mit.edu>
Sun, 29 Jul 2012 04:01:29 +0000 (00:01 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 29 Jul 2012 04:01:29 +0000 (00:01 -0400)
commita85f83503a6eabeed6913520c97f49877dc2a366
treebe238291ed6e6e4fa8f17cd041dbc74366bcf601
parent032eafee3007001d07ee1798db6166a0031a3601
Revert "e2fsck: Skip journal checks if the fs is mounted and doesn't need recovery"

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