Re: fts and O_NOATIME

2011-07-07 Thread Jim Meyering
Eric Blake wrote: > http://savannah.gnu.org/bugs/?33724 raised the issue that findutils is > updating directory atime as part of traversing a hierarchy (and, > according to POSIX, this behavior is the correct default). However, it > would be nice to support the use of fts in a mode where O_NOATIME

Re: [PATCH] fts: introduce FTS_NOATIME

2011-07-07 Thread Eric Blake
On 07/07/2011 03:02 PM, Paul Eggert wrote: > On 07/07/11 10:41, Eric Blake wrote: >> This gives clients the option to try a non-invasive traversal, > > Thanks for doing that; a couple of minor comments: > >> -int fd = open (".", O_SEARCH); >> +int fd = open (".", >> +

Re: [PATCH] fts: introduce FTS_NOATIME

2011-07-07 Thread Paul Eggert
On 07/07/11 10:41, Eric Blake wrote: > This gives clients the option to try a non-invasive traversal, Thanks for doing that; a couple of minor comments: > -int fd = open (".", O_SEARCH); > +int fd = open (".", > + O_SEARCH | (ISSET (FTS_NOATIME) ?

[PATCH] fts: introduce FTS_NOATIME

2011-07-07 Thread Eric Blake
This gives clients the option to try a non-invasive traversal, where merely visiting a directory does not update its timestamp, where such is supported by the kernel. Note that whiteout support and O_NOATIME support are orthogonal: there is no way to get O_NOATIME behavior when using __opendir2 to

Re: [bug #33724] Find command is changing the access time of directory

2011-07-07 Thread James Youngman
I think that would also need a change to ftw(). That's in gnulib. On Thu, Jul 7, 2011 at 2:10 PM, Eric Blake wrote: > Follow-up Comment #1, bug #33724 (project findutils): > > POSIX requires this behavior.  However, Linux provides the O_NOATIME flag to > open() to work around this behavior - so

fts and O_NOATIME

2011-07-07 Thread Eric Blake
http://savannah.gnu.org/bugs/?33724 raised the issue that findutils is updating directory atime as part of traversing a hierarchy (and, according to POSIX, this behavior is the correct default). However, it would be nice to support the use of fts in a mode where O_NOATIME is used, so that director

[bug #33724] Find command is changing the access time of directory

2011-07-07 Thread Eric Blake
Follow-up Comment #1, bug #33724 (project findutils): POSIX requires this behavior. However, Linux provides the O_NOATIME flag to open() to work around this behavior - so the obvious conclusion is that find should support the option of requesting the use of the O_NOATIME flag. It can't be on by

[bug #33724] Find command is changing the access time of directory

2011-07-07 Thread Nitin Bhadauria
URL: Summary: Find command is changing the access time of directory Project: findutils Submitted by: nbhadauria Submitted on: Thu 07 Jul 2011 07:41:04 AM GMT Category: find