Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/2] Use git_open_noatime when accessing pack data

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:59

Jonathan Nieder [off-list ref] writes:
I guess I should put it another way.  What if anything does readonly
have to do with O_NOATIME?  Why shouldn't we always use O_NOATIME?
Why should the operating system provide atime at all?
Well, I think what you are getting at is that the proposed API in Shawn's
patch and my suggestion is upside down, and it should be layered more like
this (from lower to higher layers) from the interface's point of view:

 - git_open_wpf(): an API to get a file descriptor to a file, while
   protecting open fds to a packfile from getting reclaimed;

 - git_open(): a thin wrapper of the previous, for callers that do not
   need any "with-pack-file" aspect of it;

 - git_open_noatime(): a thin wrapper of the previous, for callers that do
   not want to incur inode metainformation traffic to the filesystem.
 
even though the bulk of implementation, including the logic to handle
no-atime, probably needs to happen in the lowermost layer.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help