venti: fix vtcachealloc and VtMaxLumpSize
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5309073
This commit is contained in:
parent
4544da5200
commit
db60da46b3
3 changed files with 14 additions and 2 deletions
|
|
@ -4,6 +4,12 @@
|
||||||
#include <libsec.h>
|
#include <libsec.h>
|
||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
// XXX What to do here?
|
||||||
|
VtMaxLumpSize = 65536,
|
||||||
|
};
|
||||||
|
|
||||||
int chatty;
|
int chatty;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -92,7 +98,7 @@ threadmain(int argc, char *argv[])
|
||||||
sysfatal("not a single file");
|
sysfatal("not a single file");
|
||||||
|
|
||||||
// open and read file
|
// open and read file
|
||||||
c = vtcachealloc(z, root.blocksize, 32);
|
c = vtcachealloc(z, root.blocksize*32);
|
||||||
if(c == nil)
|
if(c == nil)
|
||||||
sysfatal("vtcachealloc: %r");
|
sysfatal("vtcachealloc: %r");
|
||||||
f = vtfileopenroot(c, &e);
|
f = vtfileopenroot(c, &e);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,12 @@
|
||||||
#include <venti.h>
|
#include <venti.h>
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
// XXX What to do here?
|
||||||
|
VtMaxLumpSize = 65536,
|
||||||
|
};
|
||||||
|
|
||||||
char *host;
|
char *host;
|
||||||
Biobuf b;
|
Biobuf b;
|
||||||
VtConn *z;
|
VtConn *z;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ threadmain(int argc, char *argv[])
|
||||||
sysfatal("vtconnect: %r");
|
sysfatal("vtconnect: %r");
|
||||||
|
|
||||||
// write file
|
// write file
|
||||||
c = vtcachealloc(z, Blocksize, 32);
|
c = vtcachealloc(z, Blocksize*32);
|
||||||
if(c == nil)
|
if(c == nil)
|
||||||
sysfatal("vtcachealloc: %r");
|
sysfatal("vtcachealloc: %r");
|
||||||
f = vtfilecreateroot(c, Blocksize, Blocksize, VtDataType);
|
f = vtfilecreateroot(c, Blocksize, Blocksize, VtDataType);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue