forked from rpms/e2fsprogs
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
|
From a9daa3b6b888c2834de9869ba8037c22ae8c47e5 Mon Sep 17 00:00:00 2001
|
||
|
From: Theodore Ts'o <tytso@mit.edu>
|
||
|
Date: Wed, 1 Jan 2020 21:50:27 -0500
|
||
|
Subject: [PATCH 10/10] e2fsck: don't check for future superblock times if
|
||
|
checkinterval == 0
|
||
|
|
||
|
We are no longer enabling periodic file system checks by default in
|
||
|
mke2fs. The only reason why we force file system checks if the last
|
||
|
mount time or last write time in the superblock is if this might
|
||
|
bypass the periodic file systme checks. So if the checkinterval is
|
||
|
zero, skip the last mount/write time checks since there's no reason to
|
||
|
force a check just because the system clock is incorrect.
|
||
|
|
||
|
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||
|
---
|
||
|
e2fsck/super.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/e2fsck/super.c b/e2fsck/super.c
|
||
|
index e5932be6..18affcf7 100644
|
||
|
--- a/e2fsck/super.c
|
||
|
+++ b/e2fsck/super.c
|
||
|
@@ -1038,7 +1038,7 @@ void check_super_block(e2fsck_t ctx)
|
||
|
* Check to see if the superblock last mount time or last
|
||
|
* write time is in the future.
|
||
|
*/
|
||
|
- if (!broken_system_clock &&
|
||
|
+ if (!broken_system_clock && fs->super->s_checkinterval &&
|
||
|
!(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||
|
fs->super->s_mtime > (__u32) ctx->now) {
|
||
|
pctx.num = fs->super->s_mtime;
|
||
|
@@ -1050,7 +1050,7 @@ void check_super_block(e2fsck_t ctx)
|
||
|
fs->flags |= EXT2_FLAG_DIRTY;
|
||
|
}
|
||
|
}
|
||
|
- if (!broken_system_clock &&
|
||
|
+ if (!broken_system_clock && fs->super->s_checkinterval &&
|
||
|
!(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||
|
fs->super->s_wtime > (__u32) ctx->now) {
|
||
|
pctx.num = fs->super->s_wtime;
|
||
|
--
|
||
|
2.21.1
|
||
|
|