mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: "Robin H. Johnson" <robbat2@gentoo.org>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] tmpfs time granularity fix for [acm]time going backwards. Also VFS time granularity bug on creat(). (Repost, more content)
Date: Mon, 12 Jun 2006 20:24:19 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0606122011020.18760@blonde.wat.veritas.com> (raw)
In-Reply-To: <20060612051001.GA18634@curie-int.vc.shawcable.net>

On Sun, 11 Jun 2006, Robin H. Johnson wrote:
> On Sun, Jun 11, 2006 at 07:10:31PM +0100, Hugh Dickins wrote:
> 
> > Perhaps we could devise a debug WARN_ON somewhere to check consistent
> > granularity; but I don't have the ingenuity right now, and would need
> > an additional superblock field or flag to not spam the logs horribly.
> > Perhaps it's easier just to delete CURRENT_TIME, converting its users.
> Yes, I'd agree that replacing CURRENT_TIME in filesystems with
> current_fs_time should be worthwhile for all filesystems - That,
> combined with your patch below to ensure they all use s_time_gran,
> should ensure safety.
> 
> A total removal of CURRENT_TIME wouldn't work, there are a few other
> users besides setting [acm]times - however as above, we should be able
> to kill it for all filesystems.

Well, with CURRENT_TIME defined, for some time to come we're likely
to have new filesystems going into the tree, copying old filesystems,
using CURRENT_TIME but not setting s_time_gran.  Undefining CURRENT_TIME
and updating all its users would prevent that; but I don't intend to do
so myself, and it certainly wouldn't be a 2.6.17 thing.

> However CURRENT_TIME_SEC looks safe to convert, all of it's users are
> filesystems.

There should be no need to change that one at all: it was introduced to
match the default s_time_gran of one second, so filesystems using it
are declaring that they understand all this.  Except for that odd
stray usage in JFS.

> > Setting that safety aside, the patch below (against 2.6.17-rc6) looks
> > to me like all that's currently needed in mainline - but ecryptfs and
> > reiser4 in the mm tree will also want fixing, and more discrepancies
> > are sure to trickle in later.
> I checked at well, and this does cover every filesystem I see in the
> mainline.

Oh, thanks a lot for double checking, that's a great help.

> > If anyone thinks tmpfs is the most important to fix (I would think
> > that, wouldn't I?), I can forward your fix to Linus ahead of the rest.
> > Or if people agree the patch below is good, I can sign it off and send;
> > or FS maintainers extract their own little parts.
> I'd appreciate it tmpfs either of the fixes actually making it to
> 2.6.17, there are a reasonable number of Gentoo users that use tmpfs as
> temporary storage to compile stuff, and there's a long-standing argument
> that tmpfs wasn't safe for that, due to this bug ;-).

Right, I don't want Gentoo user impugning the safety of tmpfs:
I'll send just your patch on to Linus; but divide the rest up
to send to maintainers later (some of my choices may be wrong).

Hugh

  parent reply	other threads:[~2006-06-12 19:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-11 11:54 Robin H. Johnson
2006-06-11 18:10 ` Hugh Dickins
2006-06-12  5:10   ` Robin H. Johnson
2006-06-12  7:19     ` Jan Engelhardt
2006-06-12 19:24     ` Hugh Dickins [this message]
2006-06-12 20:50       ` [PATCH] tmpfs: time granularity fix for [acm]time going backwards Hugh Dickins
2006-06-13  3:38         ` Andi Kleen
2006-06-12 12:22 ` [PATCH] tmpfs time granularity fix for [acm]time going backwards. Also VFS time granularity bug on creat(). (Repost, more content) Andi Kleen
2006-06-12 19:38   ` Hugh Dickins
2006-06-13  3:49     ` Andi Kleen

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=Pine.LNX.4.64.0606122011020.18760@blonde.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robbat2@gentoo.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®