Lines Matching defs:hash

98 	LIST_ENTRY(namecache) nc_hash;	/* hash chain */
145 * used names will hang around. Cache is indexed by hash value
159 * bucketlock rwlock for access to given set of hash buckets
191 #define NCHHASH(hash) \
192 (&nchashtbl[(hash) & nchash])
194 static u_long __read_mostly nchash; /* size of hash table */
196 "Size of namecache hash table");
244 #define HASH2BUCKETLOCK(hash) \
245 ((struct rwlock *)(&bucketlocks[((hash) & ncbuckethash)]))
419 uint32_t hash;
421 hash = fnv_32_buf(name, len, FNV1_32_INIT);
422 hash = fnv_32_buf(&dvp, sizeof(dvp), hash);
423 return (hash);
429 uint32_t hash;
431 hash = cache_get_hash(ncp->nc_name, ncp->nc_nlen, ncp->nc_dvp);
432 return (HASH2BUCKETLOCK(hash));
553 * Grab an atomic snapshot of the name cache hash chain lengths
556 "hash table stats");
576 /* Scan hash tables counting entries */
608 /* Scan hash tables for applicable entries */
1131 uint32_t hash;
1170 hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp);
1171 blp = HASH2BUCKETLOCK(hash);
1173 if (LIST_EMPTY(NCHHASH(hash)))
1178 LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
1251 uint32_t hash;
1306 hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp);
1307 blp = HASH2BUCKETLOCK(hash);
1310 LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) {
1532 uint32_t hash)
1537 blps[0] = HASH2BUCKETLOCK(hash);
1573 uint32_t hash)
1578 blps[0] = HASH2BUCKETLOCK(hash);
1626 uint32_t hash;
1655 hash = cache_get_hash(cnp->cn_nameptr, len, dvp);
1656 cache_enter_lock_dd(&cel, dvp, vp, hash);
1705 * Calculate the hash key and setup as much of the new
1725 hash = cache_get_hash(cnp->cn_nameptr, len, dvp);
1727 cache_enter_lock(&cel, dvp, vp, hash);
1734 ncpp = NCHHASH(hash);
1920 uint32_t hash;
1928 /* If same hash table size, nothing to do */
1934 * Move everything from the old hash table to the new table.
1936 * because to do so, they have to be removed from the hash table.
1946 hash = cache_get_hash(ncp->nc_name, ncp->nc_nlen,
1949 LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash);
2049 /* Scan hash tables for applicable entries */