From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: How is e2fsck's time_fudge supposed to behave?
Date: Fri, 13 Mar 2015 17:31:18 -0500 [thread overview]
Message-ID: <55036536.5030300@redhat.com> (raw)
I'm a little confused by e2fsck's time fudge current behavior, vs its
apparent intent.
We do:
if ( ... &&
fs->super->s_mtime > (__u32) ctx->now) {
pctx.num = fs->super->s_mtime;
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;
fs->flags |= EXT2_FLAG_DIRTY;
}
So if we are inside the time_fudge value we simply change the problem,
but PR_0_FUTURE_SB_LAST_MOUNT_FUDGED behaves exactly like
PR_0_FUTURE_SB_LAST_MOUNT, other than the message:
/* 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 the hardware clock being incorrectly set) "),
PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
vs:
/* Last mount time is in the future */
{ PR_0_FUTURE_SB_LAST_MOUNT,
N_("@S last mount time (%t,\n\tnow = %T) is in the future.\n"),
PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
So unless I'm missing something, the whole fudge_time dance does nothing
except change the message, and after reading lots of words in the e2fsck.conf
manpage ;) this bit seems relevant as to the intent:
> So by default, we allow the superblock times to
> be fudged by up to 24 hours.
I had the impression that "allow" meant "ignore" but this still triggers
exactly the same action and correction. Is that as intended?
I'll send a patch do a printf and take no other action if inside the
fudge_time window, if that seems like the right thing to do.
Thanks,
-Eric
next reply other threads:[~2015-03-13 22:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 22:31 Eric Sandeen [this message]
2015-03-17 17:32 ` How is e2fsck's time_fudge supposed to behave? Jan Kara
2015-03-18 18:58 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55036536.5030300@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.