venti: fix vtcachealloc and VtMaxLumpSize
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5309073
diff --git a/src/cmd/venti/readfile.c b/src/cmd/venti/readfile.c
index 2883350..00eb43e 100644
--- a/src/cmd/venti/readfile.c
+++ b/src/cmd/venti/readfile.c
@@ -4,6 +4,12 @@
#include <libsec.h>
#include <thread.h>
+enum
+{
+ // XXX What to do here?
+ VtMaxLumpSize = 65536,
+};
+
int chatty;
void
@@ -92,7 +98,7 @@
sysfatal("not a single file");
// open and read file
- c = vtcachealloc(z, root.blocksize, 32);
+ c = vtcachealloc(z, root.blocksize*32);
if(c == nil)
sysfatal("vtcachealloc: %r");
f = vtfileopenroot(c, &e);
diff --git a/src/cmd/venti/readlist.c b/src/cmd/venti/readlist.c
index 6d92808..5702cc6 100644
--- a/src/cmd/venti/readlist.c
+++ b/src/cmd/venti/readlist.c
@@ -4,6 +4,12 @@
#include <venti.h>
#include <bio.h>
+enum
+{
+ // XXX What to do here?
+ VtMaxLumpSize = 65536,
+};
+
char *host;
Biobuf b;
VtConn *z;
diff --git a/src/cmd/venti/writefile.c b/src/cmd/venti/writefile.c
index 19a26fa..2111712 100644
--- a/src/cmd/venti/writefile.c
+++ b/src/cmd/venti/writefile.c
@@ -65,7 +65,7 @@
sysfatal("vtconnect: %r");
// write file
- c = vtcachealloc(z, Blocksize, 32);
+ c = vtcachealloc(z, Blocksize*32);
if(c == nil)
sysfatal("vtcachealloc: %r");
f = vtfilecreateroot(c, Blocksize, Blocksize, VtDataType);