Whamcloud - gitweb
tune2fs/fuse2fs/debugfs: after replaying the journal, fix up s_lastcheck
authorTheodore Ts'o <tytso@mit.edu>
Sat, 24 Feb 2018 23:11:19 +0000 (18:11 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 24 Feb 2018 23:11:19 +0000 (18:11 -0500)
commit60f032bbc16772a12953ce7f6102609b9e452554
tree9a0e1d6c5a10ebaf7c65a988a3dcff6a355c1815
parentf5eb38e816c0a6329ae19464702b75de3f5d8ddf
tune2fs/fuse2fs/debugfs: after replaying the journal, fix up s_lastcheck

If the file system needs to have the journal replayed, but definition
it can't be freshly checked.  So if the time when the file system was
last checked (s_lastcheck) is before the time it was last mounted
(s_mtime), force s_lastcheck to be before s_mtime.

This is necessary to make sure some of tune2fs's safety checks work
correctly after replaying the journal, since some of tune2fs's
operations really require that the file system be self-consistent or
grave damage can result.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/journal.c