diff options
author | David du Colombier <0intro@gmail.com> | 2013-01-03 06:48:36 +0100 |
---|---|---|
committer | David du Colombier <0intro@gmail.com> | 2013-01-03 06:48:36 +0100 |
commit | 0798d6b7417c2c0fbdff759fab6a91c1030044f4 (patch) | |
tree | eb8119de9ca4a07c986f4f6430c54e2ae08f441f /src/cmd/venti | |
parent | cb71c0bdc4f605fceafe10ffd2959af693290145 (diff) | |
download | plan9port-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.c | 7 |
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); |