diff options
author | Russ Cox <rsc@swtch.com> | 2007-10-29 14:33:17 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2007-10-29 14:33:17 -0400 |
commit | 45ac814c8609174199cadb6f1bbb4baf7c12c94a (patch) | |
tree | 49f4b2120a36b080a0ffe8f9988c21db7b97656c /src/cmd/venti/srv/clump.c | |
parent | c5a183de108e5685305734d5cf984b58bb0d614a (diff) | |
download | plan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.tar.gz plan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.tar.bz2 plan9port-45ac814c8609174199cadb6f1bbb4baf7c12c94a.zip |
venti: fix sync deadlock, add /proc stub
Diffstat (limited to 'src/cmd/venti/srv/clump.c')
-rw-r--r-- | src/cmd/venti/srv/clump.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/cmd/venti/srv/clump.c b/src/cmd/venti/srv/clump.c index ec277864..ed4de34d 100644 --- a/src/cmd/venti/srv/clump.c +++ b/src/cmd/venti/srv/clump.c @@ -62,19 +62,17 @@ storeclump(Index *ix, ZBlock *zb, u8int *sc, int type, u32int creator, IAddr *ia memset(cb->data+ClumpSize+dsize, 0, 4); cl.info.size = dsize; - ia->addr = 0; - ia->type = type; - ia->size = size; - ia->blocks = (dsize + ClumpSize + (1 << ABlockLog) - 1) >> ABlockLog; - - a = writeiclump(ix, &cl, cb->data, &ia->addr); - + a = writeiclump(ix, &cl, cb->data); trace(TraceLump, "storeclump exit %lld", a); - freezblock(cb); if(a == TWID64) return -1; + ia->addr = a; + ia->type = type; + ia->size = size; + ia->blocks = (dsize + ClumpSize + (1 << ABlockLog) - 1) >> ABlockLog; + /* qlock(&stats.lock); stats.clumpwrites++; |