Revision 44d1c19ee8ab405108b90ab9c02cd86a014639e8 authored by Linus Torvalds on 14 June 2008, 18:32:37 UTC, committed by Junio C Hamano on 14 June 2008, 21:39:22 UTC
We used to do 'stat()+open()+mmap()+close()' to read the loose object
file data, which does work fine, but has a couple of problems:

 - it unnecessarily walks the filename twice (at 'stat()' time and then
   again to open it)

 - NFS generally has open-close consistency guarantees, which means that
   the initial 'stat()' was technically done outside of the normal
   consistency rules.

So change it to do 'open()+fstat()+mmap()+close()' instead, which avoids
both these issues.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5723fe7
History
File Mode Size
.gitignore -rw-r--r-- 47 bytes
Git.pm -rw-r--r-- 29.1 KB
Makefile -rw-r--r-- 1.0 KB
Makefile.PL -rw-r--r-- 745 bytes
private-Error.pm -rw-r--r-- 18.6 KB

back to top