On 07/08/2011 10:55 AM, Jim Meyering wrote:
> Eric Blake wrote:
>> 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 visit whiteouts on BSD systems.
>>
>> * lib/fts_.h (FTS_NOATIME): New bit flag.
>> (FTS_OPTIONMASK): Adjust.
>> * lib/fts.c (diropen, fts_open, fts_build): Honor it.
>> (fd_ring_check): Debug code unconditionally uses O_NOATIME.
>> Needed for findutils bug http://savannah.gnu.org/bugs/?33724
> 
> This looks fine.  Thanks!

Now pushed.

I'll start looking into adding a --noatime into the various recursive
coreutils.  Gnulib's replacement <fcntl.h> guarantees that O_NOATIME is
defined; however it might be 0 on systems with no support, and even
where it is non-zero, there are older Linux kernels that silently ignore
the flag.  Therefore, my thoughts are that:

if O_NOATIME is 0, --noatime should be rejected as an outright
impossibility.

if O_NOATIME is non-zero, --noatime should enable FTS_NOATIME, but only
as a best-effort (that is, the option is silently ignored where the
kernel is too old), as there is no easy interface to tell at runtime
whether O_NOATIME will actually be honored.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to