Subject: bug#18406: O_NOATIME patch

From: Eric Blake <[email-masked]>
Date: Thu, 11 Sep 2014 14:50:10 -0600

On 09/11/2014 02:13 PM, Paul Eggert wrote:
>> If the patch is of interest I'm willing
>> to improve it by having the feature
>> present conditionally on the appearance of
>>     HAVE_WORKING_O_NOATIME
>> in 'config.h'.
> 
> Thanks, but there's no need for that; just have 'grep' complain if the
> option is used and O_NOATIME == 0.
> 
> I'm of two minds about this suggestion.  On the one hand we don't want
> to add an option like this to every utility that reads files. On the
> other hand grep is used soooo often that it may be justifiable.  What do
> other people think?
> 
> If we add it, it should not have a single-letter option, though, and the
> long option should be called "--atime-preserve" for compatibility with
> tar, and the patch should also use FTS_NOATIME to avoid updating atime
> on directories with grep -r, and it should be documented properly in
> grep.texi and in 'grep --help' output and in NEWS (plus maybe write a
> test case or two....).

Lots of work, but I like the idea.  In fact, I proposed a similar idea
for coreutils' du several years ago, and the only reason I haven't
actually submitted a patch is _because_ it is a lot of this detail work.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org