OSDN Git Service

e2fsck: skip checking the journal fields if the file system is mounted
authorTheodore Ts'o <tytso@mit.edu>
Fri, 19 Jun 2015 22:14:33 +0000 (18:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 19 Jun 2015 22:14:33 +0000 (18:14 -0400)
commit6f5bb811e81747fc5754e896f591fa31a148354b
treed4fbe0c39500cae402a12da5abf7235498953d63
parentdc810decfa3724fba59548eaf8efd75ec3291d60
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>
e2fsck/unix.c