Lines Matching refs:hash_size
145 #define TDB_HASHTABLE_SIZE(tdb) ((tdb->header.hash_size+1)*sizeof(tdb_off_t))
146 #define TDB_DATA_START(hash_size) TDB_HASH_TOP(hash_size-1) argument
167 #define BUCKET(hash) ((hash) % tdb->header.hash_size)
199 u32 hash_size; /* number of hash entries */ member
428 if (list < -1 || list >= (int)tdb->header.hash_size) { in _tdb_lock()
527 if (list < -1 || list >= (int)tdb->header.hash_size) { in tdb_unlock()
528 …TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlock: list %d invalid (%d)\n", list, tdb->header.hash_size)); in tdb_unlock()
653 0, 4*tdb->header.hash_size)) { in _tdb_lockall()
692 0, 4*tdb->header.hash_size)) { in _tdb_unlockall()
958 for (;h < tdb->header.hash_size;h++) { in tdb_next_hash_chain()
965 for (;h < tdb->header.hash_size;h++) { in tdb_next_hash_chain()
1536 for (;h < tdb->header.hash_size;h++) { in transaction_next_hash_chain()
1660 calloc(tdb->header.hash_size+1, sizeof(u32)); in tdb_transaction_start()
1731 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 4*tdb->header.hash_size); in tdb_transaction_cancel()
2376 if (left > TDB_DATA_START(tdb->header.hash_size)) { in tdb_free()
2605 mem_tdb = tdb_open("flval", tdb->header.hash_size, in tdb_validate_freelist()
2668 for (; tlock->hash < tdb->header.hash_size; tlock->hash++) { in tdb_next_lock()
2699 if (tlock->hash == tdb->header.hash_size) { in tdb_next_lock()
3023 for (i = 0; i < (int)tdb->header.hash_size; i++) { in tdb_dump_all()
3703 return tdb->header.hash_size; in tdb_hash_size()
3746 static int tdb_new_database(struct tdb_context *tdb, int hash_size) in tdb_new_database() argument
3752 size = sizeof(struct tdb_header) + (hash_size+1)*sizeof(tdb_off_t); in tdb_new_database()
3758 newdb->hash_size = hash_size; in tdb_new_database()
3815 struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags, in tdb_open() argument
3818 return tdb_open_ex(name, hash_size, tdb_flags, open_flags, mode, NULL, NULL); in tdb_open()
3830 struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, in tdb_open_ex() argument
3873 if (hash_size == 0) in tdb_open_ex()
3874 hash_size = DEFAULT_HASH_SIZE; in tdb_open_ex()
3886 if (tdb_new_database(tdb, hash_size) != 0) { in tdb_open_ex()
3924 if (!(open_flags & O_CREAT) || tdb_new_database(tdb, hash_size) == -1) { in tdb_open_ex()