Re: [PATCH] tmpfs 2/4 mknod times

Jan Harkes (jaharkes@cs.cmu.edu)
Wed, 12 Jun 2002 11:26:42 -0400


On Tue, Jun 11, 2002 at 08:31:20PM -0700, Ryan Cumming wrote:
> On June 11, 2002 20:25, Hugh Dickins wrote:
> > On Tue, 11 Jun 2002, Ryan Cumming wrote:
> > > On June 11, 2002 19:54, Hugh Dickins wrote:
> > > > + dir->i_ctime = dir->i_mtime = CURRENT_TIME;
> > >
> > > I'm probably misreading this, but why does shmem_mknod modify the
> > > directory's ctime?
> >
> > Hmmm, good question. Perhaps I'll have dreamt up an answer by morning.
> Well, lets see if the list has any ideas while you're sleeping.

My guess would be that 'mtime' should be always updated because the
directory contents is changed (a new name is added). And 'ctime' has to
change whenever this new name cause a change in the size of the
directory because the i_size attribute has changed.

As tmpfs doesn't really have on-disk blocks for it's directories, every
create will change the directory size. (as well as every unlink).

Jan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/