projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e984ef6
)
tdb2: fix bucket search
author
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 17 Nov 2010 10:00:07 +0000
(20:30 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 17 Nov 2010 10:00:07 +0000
(20:30 +1030)
We were previously jumping straight from the first bucket to the end.
ccan/tdb2/free.c
patch
|
blob
|
history
diff --git
a/ccan/tdb2/free.c
b/ccan/tdb2/free.c
index 48cd9c315ce02f4859ea15b0ec6de97ccde132d5..f5107fadfbd888efae8094b1ff8d3cc4010c3ca8 100644
(file)
--- a/
ccan/tdb2/free.c
+++ b/
ccan/tdb2/free.c
@@
-559,7
+559,7
@@
static tdb_off_t get_free(struct tdb_context *tdb,
b = size_to_bucket(tdb->zhdr.zone_bits, size);
for (b = find_free_head(tdb, b);
b <= BUCKETS_FOR_ZONE(tdb->zhdr.zone_bits);
- b
+
= find_free_head(tdb, b + 1)) {
+ b = find_free_head(tdb, b + 1)) {
/* Try getting one from list. */
off = lock_and_alloc(tdb, tdb->zone_off,
tdb->zhdr.zone_bits,