venti: 32-bit extensions to data structures

This commit is contained in:
Russ Cox 2009-05-25 02:11:27 -07:00
parent 33b446b8bb
commit 75d048884c
18 changed files with 283 additions and 118 deletions

View file

@ -4,6 +4,12 @@
#include <libsec.h>
#include <thread.h>
enum
{
// XXX What to do here?
VtMaxLumpSize = 65536,
};
int changes;
int rewrite;
int ignoreerrors;

View file

@ -5,6 +5,12 @@
#include <libsec.h>
#include <thread.h>
enum
{
// XXX What to do here?
VtMaxLumpSize = 65536,
};
VtConn *z;
char *host;

View file

@ -4,6 +4,12 @@
#include <libsec.h>
#include <thread.h>
enum
{
// XXX What to do here?
VtMaxLumpSize = 65536,
};
void
usage(void)
{

View file

@ -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;

View file

@ -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 */

View file

@ -4,6 +4,12 @@
#include <libsec.h>
#include <thread.h>
enum
{
// XXX What to do here?
VtMaxLumpSize = 65536,
};
void
usage(void)
{