diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2006-12-23 02:34:01 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-29 11:36:44 -0800 |
commit | 9bc879c1ced505089e2a1e420d32599bb15b35b5 (patch) | |
tree | 8fb8afafeac20359343f2acd2d142199a2de2546 /Documentation/git-sh-setup.txt | |
parent | Create read_or_die utility routine. (diff) | |
download | tgif-9bc879c1ced505089e2a1e420d32599bb15b35b5.tar.xz |
Refactor how we open pack files to prepare for multiple windows.
To efficiently support mmaping of multiple regions of the same pack
file we want to keep the pack's file descriptor open while we are
actively working with that pack. So we are now keeping that file
descriptor in packed_git.pack_fd and closing it only after we unmap
the last window.
This is going to increase the number of file descriptors that are
in use at once, however that will be bounded by the total number of
pack files present and therefore should not be very high. It is
a small tradeoff which we may need to revisit after some testing
can be done on various repositories and systems.
For code clarity we also want to seperate out the implementation
of how we open a pack file from the implementation which locates
a suitable window (or makes a new one) from the given pack file.
Since this is a rather large delta I'm taking advantage of doing
it now, in a fairly isolated change.
When we open a pack file we need to examine the header and trailer
without having a mmap in place, as we may only need to mmap
the middle section of this particular pack. Consequently the
verification code has been refactored to make use of the new
read_or_die function.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/git-sh-setup.txt')
0 files changed, 0 insertions, 0 deletions