man: update venti-cache(3)

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5329041
This commit is contained in:
David du Colombier 2011-11-08 09:02:24 -05:00 committed by Russ Cox
parent 519fe61375
commit 11758776a1

View file

@ -7,7 +7,6 @@ vtblockput,
vtblockwrite, vtblockwrite,
vtcachealloc, vtcachealloc,
vtcacheallocblock, vtcacheallocblock,
vtcacheblocksize,
vtcachefree, vtcachefree,
vtcacheglobal, vtcacheglobal,
vtcachelocal, vtcachelocal,
@ -36,28 +35,25 @@ typedef struct VtBlock
.ta +\w'\fLVtBlock* 'u +\w'\fLxxxxxxxx'u .ta +\w'\fLVtBlock* 'u +\w'\fLxxxxxxxx'u
.PP .PP
.B .B
VtCache* vtcachealloc(VtConn *z, int blocksize, ulong nblocks); VtCache* vtcachealloc(VtConn *z, ulong maxmem);
.PP .PP
.B .B
void vtcachefree(VtCache *c); void vtcachefree(VtCache *c);
.PP .PP
.B .B
u32int vtcacheblocksize(VtCache *c);
.PP
.B
u32int vtglobaltolocal(uchar score[VtScoreSize]) u32int vtglobaltolocal(uchar score[VtScoreSize])
.br .br
.B .B
void vtlocaltoglobal(u32int local, uchar score[VtScoreSize]) void vtlocaltoglobal(u32int local, uchar score[VtScoreSize])
.PP .PP
.B .B
VtBlock* vtcacheallocblock(VtCache *c, int type); VtBlock* vtcacheallocblock(VtCache *c, int type, ulong size);
.PP .PP
.B .B
VtBlock* vtcachelocal(VtCache *c, u32int addr, int type); VtBlock* vtcachelocal(VtCache *c, u32int addr, int type);
.PP .PP
.B .B
VtBlock* vtcacheglobal(VtCache *c, uchar[VtScoreSize], int type); VtBlock* vtcacheglobal(VtCache *c, uchar[VtScoreSize], int type, ulong size);
.PP .PP
.B .B
void vtblockput(VtBlock *b); void vtblockput(VtBlock *b);
@ -119,17 +115,13 @@ allocates a new cache using the client connection
.IR venti-conn (3) .IR venti-conn (3)
and and
.IR venti-client (3)), .IR venti-client (3)),
with room for with
.I nblocks .I maxmem
of maximum block size bytes of memory.
.I blocksize .
.PP .PP
.I Vtcachefree .I Vtcachefree
frees a cache and all the associated blocks. frees a cache and all the associated blocks.
.PP .PP
.I Vtcacheblocksize
returns the cache's maximum block size.
.PP
.I Vtglobaltolocal .I Vtglobaltolocal
returns the local address corresponding to the given returns the local address corresponding to the given
local local
@ -147,7 +139,9 @@ to the local score for the cache address
.PP .PP
.I Vtcacheallocblock .I Vtcacheallocblock
allocates a new local block with the given allocates a new local block with the given
.IR type . .I type
and
.IR size .
.PP .PP
.I Vtcachelocal .I Vtcachelocal
retrieves the local block at address retrieves the local block at address
@ -160,9 +154,10 @@ must match the type of the block found at
.PP .PP
.I Vtcacheglobal .I Vtcacheglobal
retrieves the block with the given retrieves the block with the given
.I score .IR score ,
and
.I dtype .I dtype
and
.I size
from the cache, consulting the Venti server from the cache, consulting the Venti server
if necessary. if necessary.
If passed a local score, If passed a local score,