Re: [PATCH v3 2/3] sha1_file: open window into packfiles with O_CLOEXEC
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Oct 27, 2016, 23:19 UTC
- Message-ID
- <CA+55aFxdy4maom8byH0FoBBMWx+sQB8J7uWvHOxswjiaAhSjVg@mail.gmail.com>
- In-Reply-To
- <CA+55aFxTHF4BRfcrCiV1D26-be+_rPhwAV+Vq8Roz-NMpPBadg@mail.gmail.com>
On Thu, Oct 27, 2016 at 4:09 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > That said, now that I think about it, I should double-check: maybe > open() doesn't actually set atime at all, and we *could* do NOATIME > with SETFL after all.
Checked. Yup. O_NOATIME could easily be done with SETFL:, because as with O_CLOEXEC, it only affects operations _after_ the open. The open itself doesn't set the access time.
So I was full of it.
But the basic issue still remains - I'd really prefer to have NOATIME stay around for all those poor misguided souls that for some reason don't like "relatime" or run old kernels. But whether it is with O_NOATIME at open time or with F_SETFL, I don't care.
Linus