Lines Matching defs:dirh_e

162 	struct dirhash_entry *dirh_e;
172 while ((dirh_e = LIST_FIRST(&dirh->entries[hashline]))
174 LIST_REMOVE(dirh_e, next);
175 pool_put(&dirhash_entry_pool, dirh_e);
179 while ((dirh_e = LIST_FIRST(&dirh->free_entries)) != NULL) {
180 LIST_REMOVE(dirh_e, next);
181 pool_put(&dirhash_entry_pool, dirh_e);
256 struct dirhash_entry *dirh_e;
274 LIST_FOREACH(dirh_e, &dirh->entries[hashline], next) {
276 if (dirh_e->hashvalue != hashvalue)
278 if (dirh_e->offset != offset)
281 KASSERT(dirh_e->d_namlen == dirent->d_namlen);
282 KASSERT(dirh_e->entry_size == entry_size);
291 LIST_FOREACH(dirh_e, &dirh->free_entries, next) {
292 if (dirh_e->offset == offset) {
294 LIST_REMOVE(dirh_e, next);
295 pool_put(&dirhash_entry_pool, dirh_e);
322 dirh_e = pool_get(&dirhash_entry_pool, PR_WAITOK | PR_ZERO);
324 dirh_e->hashvalue = hashvalue;
325 dirh_e->offset = offset;
326 dirh_e->d_namlen = dirent->d_namlen;
327 dirh_e->entry_size = entry_size;
332 LIST_INSERT_HEAD(&dirh->entries[hashline], dirh_e, next);
338 struct dirhash_entry *dirh_e;
345 LIST_FOREACH(dirh_e, &dirh->free_entries, next) {
346 KASSERT(dirh_e->offset != offset);
351 dirh_e = pool_get(&dirhash_entry_pool, PR_WAITOK | PR_ZERO);
353 dirh_e->hashvalue = 0; /* not relevant */
354 dirh_e->offset = offset;
355 dirh_e->d_namlen = 0; /* not relevant */
356 dirh_e->entry_size = entry_size;
359 LIST_INSERT_HEAD(&dirh->free_entries, dirh_e, next);
368 struct dirhash_entry *dirh_e;
385 LIST_FOREACH(dirh_e, &dirh->entries[hashline], next) {
387 if (dirh_e->hashvalue != hashvalue)
389 if (dirh_e->offset != offset)
393 KASSERT(dirh_e->d_namlen == dirent->d_namlen);
394 KASSERT(dirh_e->entry_size == entry_size);
395 LIST_REMOVE(dirh_e, next);
417 struct dirhash_entry *dirh_e;
426 dirh_e = *result;
429 hashvalue = dirh_e->hashvalue;
430 dirh_e = LIST_NEXT(*result, next);
435 dirh_e = LIST_FIRST(&dirh->entries[hashline]);
438 for (; dirh_e; dirh_e = LIST_NEXT(dirh_e, next)) {
440 if (dirh_e->hashvalue != hashvalue)
442 if (dirh_e->d_namlen != d_namlen)
445 *result = dirh_e;
461 struct dirhash_entry *dirh_e;
469 dirh_e = LIST_NEXT(*result, next);
472 dirh_e = LIST_FIRST(&dirh->free_entries);
475 for (; dirh_e; dirh_e = LIST_NEXT(dirh_e, next)) {
477 if (dirh_e->entry_size < min_entrysize)
480 *result = dirh_e;
492 struct dirhash_entry *dirh_e;
497 LIST_FOREACH(dirh_e, &dirh->entries[hashline], next) {