diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-21 19:22:46 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-21 19:22:46 +0100 |
commit | 40d11cea3fac49a660b5714b18393c2e74487d54 (patch) | |
tree | 09ae5180eaeefffa293cec6d2e71765e0e951f9b /sys/src/cmd/hgfs/fns.h | |
parent | 73744b9f4896c513d4d7c40ef4ce1d24703810e9 (diff) |
hgfs: various improvements
lazily close revlog files and keep up to 8
revlogs arround. also cache the latest extracted
file descriptor of a revision in the revlog.
this avoids the quite expensive reextracting/patching
when we reopen the same file revision.
dont use the racy mktemp()/create, instead create
a uniqueue name and create with OEXCL. this also
avoids a bunch of access() calls.
fix eof case and use pread() in fcopy() to avoid the
seeks.
dont modify changelog temp file but simulate trailing
newline instead.
Diffstat (limited to 'sys/src/cmd/hgfs/fns.h')
-rw-r--r-- | sys/src/cmd/hgfs/fns.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/cmd/hgfs/fns.h b/sys/src/cmd/hgfs/fns.h index 42c6f736f..6145330b0 100644 --- a/sys/src/cmd/hgfs/fns.h +++ b/sys/src/cmd/hgfs/fns.h @@ -6,6 +6,7 @@ int fhash(int fd, uchar p1[], uchar p2[], uchar h[]); int readhash(char *path, char *name, uchar hash[]); /* patch */ +int fcopy(int dfd, int sfd, vlong off, vlong len); int fpatchmark(int pfd, char *mark); int fpatch(int ofd, int bfd, int pfd); |