aboutsummaryrefslogtreecommitdiff
path: root/man/man3/venti-cache.3
diff options
context:
space:
mode:
authorDavid du Colombier <0intro@gmail.com>2011-11-08 09:02:24 -0500
committerRuss Cox <rsc@swtch.com>2011-11-08 09:02:24 -0500
commit11758776a1be725491395b59d52074e7f6fb6f82 (patch)
tree9ea9fa3382d93b4dd98f7fcb7d04de9ca140183f /man/man3/venti-cache.3
parent519fe613753fe0fd38491a4249fbbdff7dbec8be (diff)
downloadplan9port-11758776a1be725491395b59d52074e7f6fb6f82.tar.gz
plan9port-11758776a1be725491395b59d52074e7f6fb6f82.tar.bz2
plan9port-11758776a1be725491395b59d52074e7f6fb6f82.zip
man: update venti-cache(3)
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5329041
Diffstat (limited to 'man/man3/venti-cache.3')
-rw-r--r--man/man3/venti-cache.329
1 files changed, 12 insertions, 17 deletions
diff --git a/man/man3/venti-cache.3 b/man/man3/venti-cache.3
index 9a90dd58..54e46c61 100644
--- a/man/man3/venti-cache.3
+++ b/man/man3/venti-cache.3
@@ -7,7 +7,6 @@ vtblockput,
vtblockwrite,
vtcachealloc,
vtcacheallocblock,
-vtcacheblocksize,
vtcachefree,
vtcacheglobal,
vtcachelocal,
@@ -36,28 +35,25 @@ typedef struct VtBlock
.ta +\w'\fLVtBlock* 'u +\w'\fLxxxxxxxx'u
.PP
.B
-VtCache* vtcachealloc(VtConn *z, int blocksize, ulong nblocks);
+VtCache* vtcachealloc(VtConn *z, ulong maxmem);
.PP
.B
void vtcachefree(VtCache *c);
.PP
.B
-u32int vtcacheblocksize(VtCache *c);
-.PP
-.B
u32int vtglobaltolocal(uchar score[VtScoreSize])
.br
.B
void vtlocaltoglobal(u32int local, uchar score[VtScoreSize])
.PP
.B
-VtBlock* vtcacheallocblock(VtCache *c, int type);
+VtBlock* vtcacheallocblock(VtCache *c, int type, ulong size);
.PP
.B
VtBlock* vtcachelocal(VtCache *c, u32int addr, int type);
.PP
.B
-VtBlock* vtcacheglobal(VtCache *c, uchar[VtScoreSize], int type);
+VtBlock* vtcacheglobal(VtCache *c, uchar[VtScoreSize], int type, ulong size);
.PP
.B
void vtblockput(VtBlock *b);
@@ -119,17 +115,13 @@ allocates a new cache using the client connection
.IR venti-conn (3)
and
.IR venti-client (3)),
-with room for
-.I nblocks
-of maximum block size
-.I blocksize .
+with
+.I maxmem
+bytes of memory.
.PP
.I Vtcachefree
frees a cache and all the associated blocks.
.PP
-.I Vtcacheblocksize
-returns the cache's maximum block size.
-.PP
.I Vtglobaltolocal
returns the local address corresponding to the given
local
@@ -147,7 +139,9 @@ to the local score for the cache address
.PP
.I Vtcacheallocblock
allocates a new local block with the given
-.IR type .
+.I type
+and
+.IR size .
.PP
.I Vtcachelocal
retrieves the local block at address
@@ -160,9 +154,10 @@ must match the type of the block found at
.PP
.I Vtcacheglobal
retrieves the block with the given
-.I score
-and
+.IR score ,
.I dtype
+and
+.I size
from the cache, consulting the Venti server
if necessary.
If passed a local score,