/* Last mount time is in the future */
{ PR_0_FUTURE_SB_LAST_MOUNT,
N_("@S last mount time is in the future. "),
- PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+ PROMPT_FIX, PR_NO_OK },
/* Last write time is in the future */
{ PR_0_FUTURE_SB_LAST_WRITE,
N_("@S last write time is in the future. "),
- PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+ PROMPT_FIX, PR_NO_OK },
{ PR_0_EXTERNAL_JOURNAL_HINT,
N_("@S hint for external superblock @s %X. "),
N_("The test_fs flag is set (and ext4 is available). "),
PROMPT_CLEAR, PR_PREEN_OK },
+ /* Last mount time is in the future (fudged) */
+ { PR_0_FUTURE_SB_LAST_MOUNT_FUDGED,
+ N_("@S last mount time is in the future.\n\t(by less than a day, "
+ "probably due to buggy init scripts) "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
+ /* Last write time is in the future (fudged) */
+ { PR_0_FUTURE_SB_LAST_WRITE_FUDGED,
+ N_("@S last write time is in the future.\n\t(by less than a day, "
+ "probably due to buggy init scripts). "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+
/* Pass 1 errors */
/* Pass 1: Checking inodes, blocks, and sizes */
blk_t first_block, last_block;
struct ext2_super_block *sb = fs->super;
struct ext2_group_desc *gd;
+ problem_t problem;
blk_t blocks_per_group = fs->super->s_blocks_per_group;
blk_t bpg_max;
int inodes_per_block;
* Check to see if the superblock last mount time or last
* write time is in the future.
*/
- if (fs->super->s_mtime > (__u32) ctx->now + ctx->time_fudge) {
+ if (fs->super->s_mtime > (__u32) ctx->now) {
pctx.num = fs->super->s_mtime;
- if (fix_problem(ctx, PR_0_FUTURE_SB_LAST_MOUNT, &pctx)) {
+ problem = PR_0_FUTURE_SB_LAST_MOUNT;
+ if (fs->super->s_mtime <= (__u32) ctx->now + ctx->time_fudge)
+ problem = PR_0_FUTURE_SB_LAST_MOUNT_FUDGED;
+ if (fix_problem(ctx, problem, &pctx)) {
fs->super->s_mtime = ctx->now;
ext2fs_mark_super_dirty(fs);
}
}
- if (fs->super->s_wtime > (__u32) ctx->now + ctx->time_fudge) {
+ if (fs->super->s_wtime > (__u32) ctx->now) {
pctx.num = fs->super->s_wtime;
- if (fix_problem(ctx, PR_0_FUTURE_SB_LAST_WRITE, &pctx)) {
+ problem = PR_0_FUTURE_SB_LAST_MOUNT;
+ if (fs->super->s_wtime <= (__u32) ctx->now + ctx->time_fudge)
+ problem = PR_0_FUTURE_SB_LAST_MOUNT_FUDGED;
+ if (fix_problem(ctx, problem, &pctx)) {
fs->super->s_wtime = ctx->now;
ext2fs_mark_super_dirty(fs);
}