#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include "logging.h"
struct tdb_layout *new_tdb_layout(void)
{
add_free_record(tdb, eoff, sizeof(struct tdb_used_record) + elen);
}
-static tdb_off_t hash_off(struct tdb_context *tdb, uint64_t list)
-{
- return tdb->header.v.hash_off
- + ((list & ((1ULL << tdb->header.v.hash_bits) - 1))
- * sizeof(tdb_off_t));
-}
-
static void add_to_hashtable(struct tdb_context *tdb,
tdb_off_t eoff,
struct tdb_data key)
mem = malloc(len);
/* Now populate our header, cribbing from a real TDB header. */
- tdb = tdb_open(NULL, TDB_INTERNAL, O_RDWR, 0, NULL);
+ tdb = tdb_open(NULL, TDB_INTERNAL, O_RDWR, 0, &tap_log_attr);
hdr = (void *)mem;
*hdr = tdb->header;
hdr->v.generation++;