OSDN Git Service
e2fsck: skip checking the journal fields if the file system is mounted
When a file system with journal checksums is mounted, the journal
checksum is only updated when the journal superblock is actually
written to disk. But when a root file system is mounted read-only,
e2fsck will get the in-memory version of the journal superblock, and
the checksum is not necessarily going to be correct. Since we only
allow the root file system to be checked while it is mounted
read-only, and we won't be trying to replay the journal anyway. So we
can skip the checking the journal superblock fields for mounted file
systems.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>