coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fts: introduce FTS_NOATIME


From: Eric Blake
Subject: Re: [PATCH] fts: introduce FTS_NOATIME
Date: Fri, 08 Jul 2011 11:27:45 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]