Re: [PATCH v3 2/3] sha1_file: open window into packfiles with O_CLOEXEC
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 27, 2016, 22:56 UTC
- Message-ID
- <xmqqoa254czs.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CA+55aFwfhFqV74s_O=GucycY9U19ysiACDqX=mK4Gf=eQ0coxQ@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 5 quoted lines
> Note that you can *not* do the same thing with O_NOATIME, since the > whole point of O_NOATIME is that it changes the behavior of the open > itself (unlike O_CLOEXEC which changes _later_ behavior, and can > always be replaced by FD_CLOEXEC fnclt modulo races that are > immaterial for git)
A tangent.
I also thought O_NOATIME shouldn't be an effective fcntl(2) thing, for the reasons you stated above, when I was studying the area because of the discussion on these patches. I was surprised to see that http://man7.org/linux/man-pages/man2/fcntl.2.html contradicts by saying F_SETFL can take O_NOATIME.
Perhaps it deserves a bugreport?