X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Ftdb2%2Fprivate.h;h=c0377363c6ac14a705868f5c74beca86f213ff84;hb=a2d8a4bf0c36bf312b30fdce3ae89d5f3ae21186;hp=9b225521c74808d62bb9c559a08abd7bb18157df;hpb=0455668028cfe8f0417037975bc3d7dd742974db;p=ccan diff --git a/ccan/tdb2/private.h b/ccan/tdb2/private.h index 9b225521..c0377363 100644 --- a/ccan/tdb2/private.h +++ b/ccan/tdb2/private.h @@ -113,6 +113,10 @@ typedef uint64_t tdb_off_t; #define TDB_OFF_MASK \ (((1ULL << (64 - TDB_OFF_UPPER_STEAL)) - 1) - TDB_OFF_HASH_GROUP_MASK) +/* We have to be able to fit a free record here. */ +#define TDB_MIN_DATA_LEN \ + (sizeof(struct tdb_free_record) - sizeof(struct tdb_used_record)) + /* We ensure buckets up to size 1 << (zone_bits - TDB_COMFORT_FACTOR_BITS). */ /* FIXME: test this matches size_to_bucket! */ #define BUCKETS_FOR_ZONE(zone_bits) ((zone_bits) + 2 - TDB_COMFORT_FACTOR_BITS) @@ -349,7 +353,8 @@ tdb_off_t find_and_lock(struct tdb_context *tdb, struct tdb_data key, int ltype, struct hash_info *h, - struct tdb_used_record *rec); + struct tdb_used_record *rec, + struct traverse_info *tinfo); int replace_in_hash(struct tdb_context *tdb, struct hash_info *h,