checkarenas -f didn't mend an inconsistency that was reparable, or rather it did, but forgot that. in my case, clumps had been written but where the writes to the clump info had not completed. syncarenas kept a set of summary errors that noted a fault before deciding whether it could repair it. this change helped me recover my venti without fuss. there might be more along these lines. Reference: /n/sources/patch/applied/syncarena Date: Tue Aug 31 21:21:46 CES 2004 --- /sys/src/cmd/venti/syncarena.c Tue Aug 31 21:21:46 2004 +++ /sys/src/cmd/venti/syncarena.c Tue Aug 31 21:21:46 2004 @@ -34,7 +34,7 @@ u8int score[VtScoreSize]; u64int uncsize, used, aa; u32int clump, clumps, cclumps, magic; - int err, flush, broken; + int err, flush, broken, cierr; used = arena->used; clumps = arena->clumps; @@ -62,6 +62,7 @@ arena->clumps++; broken = 0; + cierr = 0; lump = loadClump(arena, aa, 0, &cl, score, 0); if(lump == nil){ fprint(2, "clump=%d failed to read correctly: %R\n", clump); @@ -93,14 +94,14 @@ broken = 1; }else if(!broken && !clumpInfoEq(&ci, &cl.info)){ if(clumpInfoEq(&ci, &zci)){ - err |= SyncCIZero; + cierr |= SyncCIZero; if(!zok){ fprint(2, "unwritten clump info for clump=%d ", clump); fprint(2, "score=%V type=%d\n", cl.info.score, cl.info.type); } }else{ - err |= SyncCIErr; + cierr |= SyncCIErr; fprint(2, "bad clump info for clump=%d\n", clump); fprint(2, "\texpected score=%V type=%d size=%d uncsize=%d\n", cl.info.score, cl.info.type, cl.info.size, cl.info.uncsize); @@ -115,8 +116,10 @@ if(!writeClumpInfo(arena, clump, &ci)){ fprint(2, "can't write correct clump directory: %R\n"); err |= SyncFixErr; - } + }else + cierr &= ~(SyncCIZero|SyncCIErr); } + err |= cierr; arena->uncsize += cl.info.uncsize; if(cl.info.size < cl.info.uncsize)