aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti/srv
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/venti/srv')
-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);