aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti/checkindex.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-12 18:28:14 +0000
committerrsc <devnull@localhost>2004-03-12 18:28:14 +0000
commit9ffbb5adcaeec878d3b6db0f8b1f654e839b4689 (patch)
treebfd7abf95e87e3b97f3ae2e0ae3bf59c30839cc7 /src/cmd/venti/checkindex.c
parent7c5190d2c854128fb607289e9d83379e522c7090 (diff)
downloadplan9port-9ffbb5adcaeec878d3b6db0f8b1f654e839b4689.tar.gz
plan9port-9ffbb5adcaeec878d3b6db0f8b1f654e839b4689.tar.bz2
plan9port-9ffbb5adcaeec878d3b6db0f8b1f654e839b4689.zip
Checkpoint.
Add disk caching code and first draft of fractional index.
Diffstat (limited to 'src/cmd/venti/checkindex.c')
-rw-r--r--src/cmd/venti/checkindex.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/cmd/venti/checkindex.c b/src/cmd/venti/checkindex.c
index fa6f5efc..34edb370 100644
--- a/src/cmd/venti/checkindex.c
+++ b/src/cmd/venti/checkindex.c
@@ -11,12 +11,7 @@ checkbucket(Index *ix, u32int buck, IBucket *ib)
IEntry ie, eie;
int i, ei, ok, c;
- is = findisect(ix, buck);
- if(is == nil){
- seterr(EAdmin, "bad math in checkbuckets");
- return -1;
- }
- buck -= is->start;
+ is = findibucket(ix, buck, &buck);
eb = getdblock(is->part, is->blockbase + ((u64int)buck << is->blocklog), 1);
if(eb == nil)
return -1;
@@ -87,7 +82,7 @@ u64int found = 0;
ib.data = b->data;
zib.data = z->data;
zib.n = 0;
- zib.next = 0;
+ zib.depth = 0;
for(;;){
buck = buildbucket(ix, ies, &ib);
found += ib.n;