Home | History | Annotate | Download | only in ext2fs

Lines Matching defs:hash_size

139 #define TDB_HASHTABLE_SIZE(tdb) ((tdb->header.hash_size+1)*sizeof(tdb_off_t))
140 #define TDB_DATA_START(hash_size) TDB_HASH_TOP(hash_size-1)
161 #define BUCKET(hash) ((hash) % tdb->header.hash_size)
193 u32 hash_size; /* number of hash entries */
421 if (list < -1 || list >= (int)tdb->header.hash_size) {
520 if (list < -1 || list >= (int)tdb->header.hash_size) {
521 TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_unlock: list %d invalid (%d)\n", list, tdb->header.hash_size));
646 0, 4*tdb->header.hash_size)) {
684 0, 4*tdb->header.hash_size)) {
950 for (;h < tdb->header.hash_size;h++) {
957 for (;h < tdb->header.hash_size;h++) {
1528 for (;h < tdb->header.hash_size;h++) {
1647 calloc(tdb->header.hash_size+1, sizeof(u32));
1718 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 4*tdb->header.hash_size);
2362 if (left > TDB_DATA_START(tdb->header.hash_size)) {
2591 mem_tdb = tdb_open("flval", tdb->header.hash_size,
2654 for (; tlock->hash < tdb->header.hash_size; tlock->hash++) {
2685 if (tlock->hash == tdb->header.hash_size) {
3009 for (i=0;i<tdb->header.hash_size;i++) {
3686 return tdb->header.hash_size;
3729 static int tdb_new_database(struct tdb_context *tdb, int hash_size)
3735 size = sizeof(struct tdb_header) + (hash_size+1)*sizeof(tdb_off_t);
3741 newdb->hash_size = hash_size;
3798 struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
3801 return tdb_open_ex(name, hash_size, tdb_flags, open_flags, mode, NULL, NULL);
3811 struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
3854 if (hash_size == 0)
3855 hash_size = DEFAULT_HASH_SIZE;
3867 if (tdb_new_database(tdb, hash_size) != 0) {
3904 if (!(open_flags & O_CREAT) || tdb_new_database(tdb, hash_size) == -1) {