From 75d048884cfcb7cc4404b384da50923e22224365 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 25 May 2009 02:11:27 -0700 Subject: venti: 32-bit extensions to data structures --- src/cmd/venti/copy.c | 6 ++++++ src/cmd/venti/dump.c | 6 ++++++ src/cmd/venti/read.c | 6 ++++++ src/cmd/venti/root.c | 4 ++-- src/cmd/venti/srv/dat.h | 6 ++++++ src/cmd/venti/write.c | 6 ++++++ 6 files changed, 32 insertions(+), 2 deletions(-) (limited to 'src/cmd/venti') diff --git a/src/cmd/venti/copy.c b/src/cmd/venti/copy.c index 7e03b56c..4a05e053 100644 --- a/src/cmd/venti/copy.c +++ b/src/cmd/venti/copy.c @@ -4,6 +4,12 @@ #include #include +enum +{ + // XXX What to do here? + VtMaxLumpSize = 65536, +}; + int changes; int rewrite; int ignoreerrors; diff --git a/src/cmd/venti/dump.c b/src/cmd/venti/dump.c index 8481303a..c148b866 100644 --- a/src/cmd/venti/dump.c +++ b/src/cmd/venti/dump.c @@ -5,6 +5,12 @@ #include #include +enum +{ + // XXX What to do here? + VtMaxLumpSize = 65536, +}; + VtConn *z; char *host; diff --git a/src/cmd/venti/read.c b/src/cmd/venti/read.c index a48e62e6..4883c1d7 100644 --- a/src/cmd/venti/read.c +++ b/src/cmd/venti/read.c @@ -4,6 +4,12 @@ #include #include +enum +{ + // XXX What to do here? + VtMaxLumpSize = 65536, +}; + void usage(void) { diff --git a/src/cmd/venti/root.c b/src/cmd/venti/root.c index 5d67ad31..d41d44bc 100644 --- a/src/cmd/venti/root.c +++ b/src/cmd/venti/root.c @@ -38,7 +38,7 @@ threadmain(int argc, char *argv[]) if(argc == 0) usage(); - buf = vtmallocz(VtMaxLumpSize); + buf = vtmallocz(8192); z = vtdial(host); if(z == nil) @@ -52,7 +52,7 @@ threadmain(int argc, char *argv[]) fprint(2, "cannot parse score '%s': %r\n", argv[i]); continue; } - n = vtread(z, score, VtRootType, buf, VtMaxLumpSize); + n = vtread(z, score, VtRootType, buf, 8192); if(n < 0){ fprint(2, "could not read block %V: %r\n", score); continue; diff --git a/src/cmd/venti/srv/dat.h b/src/cmd/venti/srv/dat.h index b0b942b8..7b2bf49d 100644 --- a/src/cmd/venti/srv/dat.h +++ b/src/cmd/venti/srv/dat.h @@ -37,6 +37,12 @@ typedef struct Bloom Bloom; enum { + /* + * formerly fundamental constant, + * now a server-imposed limitation. + */ + VtMaxLumpSize = 56*1024, + ABlockLog = 9, /* log2(512), the quantum for reading arenas */ ANameSize = 64, MaxDiskBlock = 64*1024, /* max. allowed size for a disk block */ diff --git a/src/cmd/venti/write.c b/src/cmd/venti/write.c index c11a5a31..d627cae7 100644 --- a/src/cmd/venti/write.c +++ b/src/cmd/venti/write.c @@ -4,6 +4,12 @@ #include #include +enum +{ + // XXX What to do here? + VtMaxLumpSize = 65536, +}; + void usage(void) { -- cgit v1.2.3