bug-grep
[Top][All Lists]
Advanced

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

bug#18406: O_NOATIME patch


From: Paul Eggert
Subject: bug#18406: O_NOATIME patch
Date: Mon, 31 Aug 2020 19:21:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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.

Attachment: 0001-grep-new-atime-preserve-option.patch
Description: Text Data


reply via email to

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