Home | History | Annotate | Download | only in ext2fs

Lines Matching refs:hash_size

140 #define TDB_HASHTABLE_SIZE(tdb) ((tdb->header.hash_size+1)*sizeof(tdb_off_t))
141 #define TDB_DATA_START(hash_size) TDB_HASH_TOP(hash_size-1)
162 #define BUCKET(hash) ((hash) % tdb->header.hash_size)
194 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++) {
1525 for (;h < tdb->header.hash_size;h++) {
1644 calloc(tdb->header.hash_size+1, sizeof(u32));
1715 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 4*tdb->header.hash_size);
2359 if (left > TDB_DATA_START(tdb->header.hash_size)) {
2588 mem_tdb = tdb_open("flval", tdb->header.hash_size,
2651 for (; tlock->hash < tdb->header.hash_size; tlock->hash++) {
2682 if (tlock->hash == tdb->header.hash_size) {
3006 for (i=0;i<tdb->header.hash_size;i++) {
3685 return tdb->header.hash_size;
3728 static int tdb_new_database(struct tdb_context *tdb, int hash_size)
3734 size = sizeof(struct tdb_header) + (hash_size+1)*sizeof(tdb_off_t);
3740 newdb->hash_size = hash_size;
3797 struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
3800 return tdb_open_ex(name, hash_size, tdb_flags, open_flags, mode, NULL, NULL);
3810 struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
3853 if (hash_size == 0)
3854 hash_size = DEFAULT_HASH_SIZE;
3866 if (tdb_new_database(tdb, hash_size) != 0) {
3903 if (!(open_flags & O_CREAT) || tdb_new_database(tdb, hash_size) == -1) {