Re: New feature

Darren Reed (darrenr@cyber.com.au)
Wed, 24 Sep 1997 12:19:43 +1000 (EST)


In some mail I received from David S. Miller, sie wrote
>
> Date: Tue, 23 Sep 1997 21:49:12 -0400 (EDT)
> From: "Richard B. Johnson" <root@chaos.analogic.com>
>
> Correct! Now, is a directory access a file access? I don't think it
> should be.
>
> Why not? It has been forever at least for ext2. Have a look at the
> end of fs/ext2/dir.c:ext2_readdir().
>
> I think POSIX even states that this is how things should work.
>
> Those who consider the overhead of ATIME updates completely
> unacceptable should enable NO_ATIME on their partitions.
>
> ATIME is the access time for an inode, when you read an inode which
> happens to be a directory you are accessing it.

Hmmm, David, I think you missed something (or maybe Richard doesn't
mean what this really says):

] Correct! Now, is a directory access a file access? I don't think it
] should be. If it is, the new directory caching code was a lot of work
] that will be wasted in real-world applications such as a compile using
] `make`, etc. I think that only the directory "files" have been accessed,
] not every file. 'ls -la --time=atime` shows every file on my disk as
] having been accessed after `ls -R /`, which, in fact, has not happened.
] Only the directory files have been accessed.

What that appears to say to me is that stat(2) is dirtying the inodes for
files (not just directories) unless "ls -R /" is opening each file ?!

Darren