aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti
diff options
context:
space:
mode:
authorDavid du Colombier <0intro@gmail.com>2013-01-03 06:48:36 +0100
committerDavid du Colombier <0intro@gmail.com>2013-01-03 06:48:36 +0100
commit0798d6b7417c2c0fbdff759fab6a91c1030044f4 (patch)
treeeb8119de9ca4a07c986f4f6430c54e2ae08f441f /src/cmd/venti
parentcb71c0bdc4f605fceafe10ffd2959af693290145 (diff)
downloadplan9port-0798d6b7417c2c0fbdff759fab6a91c1030044f4.tar.gz
plan9port-0798d6b7417c2c0fbdff759fab6a91c1030044f4.tar.bz2
plan9port-0798d6b7417c2c0fbdff759fab6a91c1030044f4.zip
venti/wrarena: fix arenapart breakage
R=rsc https://codereview.appspot.com/7027044
Diffstat (limited to 'src/cmd/venti')
-rw-r--r--src/cmd/venti/srv/wrarena.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmd/venti/srv/wrarena.c b/src/cmd/venti/srv/wrarena.c
index 39185ca1..1e274ca7 100644
--- a/src/cmd/venti/srv/wrarena.c
+++ b/src/cmd/venti/srv/wrarena.c
@@ -181,12 +181,11 @@ threadmain(int argc, char *argv[])
part = initpart(file, OREAD);
if(part == nil)
sysfatal("can't open file %s: %r", file);
- initdcache(8 * MaxDiskBlock);
// Try as arena partition.
arena = nil;
ap = initarenapart(part);
- if(ap == nil)
+ if(ap != nil)
goto loaded;
if(readpart(part, aoffset, buf, sizeof buf) < 0)
@@ -214,12 +213,14 @@ loaded:
if(vtconnect(z) < 0)
sysfatal("vtconnect: %r");
}
-
+
print("%T starting to send data\n");
c = chancreate(sizeof(ZClump), 0);
for(i=0; i<12; i++)
vtproc(vtsendthread, nil);
+ initdcache(8 * MaxDiskBlock);
+
if(ap != nil) {
for(i=0; i<ap->narenas; i++)
rdarena(ap->arenas[i], 0);