bug-gnulib
[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: Thu, 07 Jul 2011 15:07:37 -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/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 (".",
>> +                           O_SEARCH | (ISSET (FTS_NOATIME) ? O_NOATIME : 
>> 0));
> 
> Shouldn't this use diropen rather than open?  Then you don't need
> to worry about checking the flag here.  (This comment applies to
> the existing code, too.)

Possibly.  Jim?

> 
>> +          int parent_fd = openat (cwd_fd, "..", O_SEARCH | O_NOATIME);
> 
> This uses O_NOATIME even when the user hasn't asked for it.

Yeah, because it is in debug-only code.  Debug code shouldn't interfere
with normal operation, whether or not FTS_NOATIME is in effect in normal
operation.

-- 
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]