Thread (3 messages) flat view 3 messages, 2 authors, 2016-10-27

Re: [PATCH v3 2/3] sha1_file: open window into packfiles with O_CLOEXEC

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-10-27 23:09:45

On Thu, Oct 27, 2016 at 3:56 PM, Junio C Hamano [off-list ref] wrote:
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?
It's not a bug per se.

You can indeed change O_NOATIME with F_SETFL. And it actually does
matter, since atime is normally changed by mmap(), read() and write()
calls.

So F_SETFL O_NOATIME actually does make sense, but it doesn't cover
the atime update done by open() itself.

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.

The exact [acm]time semantics are damn subtle.

             Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help