- if (!tlevel->entries) {
- tlevel->entries = tdb_access_read(tdb, tlevel->hashtable,
- sizeof(tdb_off_t)
- * tlevel->total_buckets,
- true);
- if (!tlevel->entries)
+ for (i = tdb_find_nonzero_off(tdb, tlevel->hashtable,
+ tlevel->entry, tlevel->total_buckets);
+ i != tlevel->total_buckets;
+ i = tdb_find_nonzero_off(tdb, tlevel->hashtable,
+ i+1, tlevel->total_buckets)) {
+ val = tdb_read_off(tdb, tlevel->hashtable+sizeof(tdb_off_t)*i);
+ if (unlikely(val == TDB_OFF_ERR))