Blame SOURCES/e2fsprogs-1.45.5-e2fsck-don-t-check-for-future-superblock-times-if-ch.patch

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