GNU bug report logs -
#18406
O_NOATIME patch
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 9/11/14 1:13 PM, Paul Eggert wrote:
> Thanks, but there's no need for that; just have 'grep' complain if the option is
> used and O_NOATIME == 0.
On looking into this more today, O_NOATIME seems to be just a best-effort thing
as some GNU/Linux filesystems ignore it, so grep should just join the throng and
not worry whether O_NOATIME actually works.
Also, the O_NOATIME support was withdrawn from fts a couple of years ago, so
'grep -r' can't easily avoid updating atime on directories.
A patch is attached. I'm still of two minds about this. The efficiency argument
for the new option is not as strong as it used to be, now that relatime has
taken over on ext4 style filesystems. So the main argument is "I want to search
through this directory but don't want it to count as an access"; although that's
indeed a use case I'm not quite sure it's worth modifying 'grep' over. It
doesn't seem to be worth using up a scarce option letter over, anyway, so the
attached patch uses just a long option.
[0001-grep-new-atime-preserve-option.patch (text/x-patch, attachment)]
This bug report was last modified 4 years and 346 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.