tventi: fix vtcachealloc and VtMaxLumpSize - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit db60da46b3255502597124a870d7b8714d659749
(DIR) parent 4544da52005bf0af3bb05a73f4e02ce35117aae0
(HTM) Author: David du Colombier <0intro@gmail.com>
Date: Tue, 8 Nov 2011 09:02:36 -0500
venti: fix vtcachealloc and VtMaxLumpSize
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5309073
Diffstat:
M src/cmd/venti/readfile.c | 8 +++++++-
M src/cmd/venti/readlist.c | 6 ++++++
M src/cmd/venti/writefile.c | 2 +-
3 files changed, 14 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/cmd/venti/readfile.c b/src/cmd/venti/readfile.c
t@@ -4,6 +4,12 @@
#include <libsec.h>
#include <thread.h>
+enum
+{
+ // XXX What to do here?
+ VtMaxLumpSize = 65536,
+};
+
int chatty;
void
t@@ -92,7 +98,7 @@ threadmain(int argc, char *argv[])
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);
(DIR) diff --git a/src/cmd/venti/readlist.c b/src/cmd/venti/readlist.c
t@@ -4,6 +4,12 @@
#include <venti.h>
#include <bio.h>
+enum
+{
+ // XXX What to do here?
+ VtMaxLumpSize = 65536,
+};
+
char *host;
Biobuf b;
VtConn *z;
(DIR) diff --git a/src/cmd/venti/writefile.c b/src/cmd/venti/writefile.c
t@@ -65,7 +65,7 @@ threadmain(int argc, char *argv[])
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);