mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
	linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [RFC] [PATCH 3/3] Recursive mtime for ext3
Date: Wed, 7 Nov 2007 12:51:10 +0100	[thread overview]
Message-ID: <20071107115110.GC22214@duck.suse.cz> (raw)
In-Reply-To: <4730ACBF.6050606@zytor.com>

On Tue 06-11-07 10:04:47, H. Peter Anvin wrote:
> Arjan van de Ven wrote:
> >On Tue, 6 Nov 2007 18:19:45 +0100
> >Jan Kara <jack@suse.cz> wrote:
> >
> >>Implement recursive mtime (rtime) feature for ext3. The feature works
> >>as follows: In each directory we keep a flag EXT3_RTIME_FL
> >>(modifiable by a user) whether rtime should be updated. In case a
> >>directory or a file in it is modified and when the flag is set,
> >>directory's rtime is updated, the flag is cleared, and we move to the
> >>parent. If the flag is set there, we clear it, update rtime and
> >>continue upwards upto the root of the filesystem. In case a regular
> >>file or symlink is modified, we pick arbitrary of its parents
> >>(actually the one that happens to be at the head of i_dentry list)
> >>and start the rtime update algorith there.
> >
> >Ok since mtime (and rtime) are part of the inode and not the dentry...
> >how do you deal with hardlinks? And with cases of files that have been
> >unlinked? (ok the later is a wash obviously other than not crashing)
  Unlinked files are easy - you just don't propagate the rtime anywhere.
For hardlinks see below.

> There is only one possible answer... he only updates the directory path 
> that was used to touch the particular file involved.  Thus, the 
> semantics gets grotty not just in the presence of hard links, but also 
> in the presence of bind- and other non-root mounts.
  Update of recursive mtime does not pass filesystem boundaries (i.e.
mountpoints) so bind mounts and such are non-issue (hmm, at least that was
my original idea but as I'm looking now I don't handle bind mounts properly
so that needs to be fixed). With hardlinks, you are right that the
behaviour is undeterministic - I tried to argue in the text of the mail
that this does not actually matter - there are not many hardlinks on usual
system and so the application can check hardlinked files in the old way -
i.e. look at mtime.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2007-11-07 11:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06 17:15 [RFC] [PATCH 0/3] " Jan Kara
2007-11-06 17:18 ` [RFC] [PATCH 1/3] " Jan Kara
2007-11-06 17:19 ` [RFC] [PATCH 2/3] " Jan Kara
2007-11-06 17:19 ` [RFC] [PATCH 3/3] " Jan Kara
2007-11-06 17:40   ` Arjan van de Ven
2007-11-06 18:04     ` H. Peter Anvin
2007-11-07 11:51       ` Jan Kara [this message]
2007-11-06 18:01   ` Al Viro
2007-11-07 14:54     ` Jan Kara
2007-11-06 19:40   ` Theodore Tso
2007-11-07 14:36     ` Jan Kara
2007-11-08  0:20       ` Theodore Tso
2007-11-08 10:56         ` Jan Kara
2007-11-08 14:37           ` Theodore Tso
2007-11-08 15:28             ` Jan Kara

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=20071107115110.GC22214@duck.suse.cz \
    --to=jack@suse.cz \
    --cc=arjan@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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 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®