-struct tdb1_context {
- char *name; /* the name of the database */
- void *map_ptr; /* where it is currently mapped */
- int fd; /* open file descriptor for the database */
- tdb1_len_t map_size; /* how much space has been mapped */
- int read_only; /* opened read-only */
- int traverse_read; /* read-only traversal */
- int traverse_write; /* read-write traversal */
- struct tdb1_lock_type allrecord_lock; /* .offset == upgradable */
- int num_lockrecs;
- struct tdb1_lock_type *lockrecs; /* only real locks, all with count>0 */
- enum TDB1_ERROR ecode; /* error code for last tdb error */
- struct tdb1_header header; /* a cached copy of the header */
- uint32_t flags; /* the flags passed to tdb1_open */
- struct tdb1_traverse_lock travlocks; /* current traversal locks */
- struct tdb1_context *next; /* all tdbs to avoid multiple opens */
- dev_t device; /* uniquely identifies this tdb */
- ino_t inode; /* uniquely identifies this tdb */
- struct tdb1_logging_context log;
- unsigned int (*hash_fn)(TDB1_DATA *key);
- int open_flags; /* flags used in the open - needed by reopen */
- const struct tdb1_methods *methods;
- struct tdb1_transaction *transaction;
- int page_size;
- int max_dead_records;
-};