Home | History | Annotate | Download | only in coda

Lines Matching refs:hash

64  * hash table.
99 int coda_nc_hashsize = CODA_NC_HASHSIZE; /* size of the primary hash */
102 struct coda_hash *coda_nc_hash; /* hash table of cfscache pointers */
117 kauth_cred_t cred, int hash);
122 * Initialize the cache, the LRU structure and the Hash structure(s)
140 printf("CODA NAME CACHE: CACHE %d, HASH TBL %d\n", CODA_NC_CACHESIZE, CODA_NC_HASHSIZE);
167 kauth_cred_t cred, int hash)
170 * hash to find the appropriate bucket, look through the chain
177 myprintf(("coda_nc_find(dcp %p, name %s, len %d, cred %p, hash %d\n",
178 dcp, name, namelen, cred, hash));)
180 LIST_FOREACH(cncp, &coda_nc_hash[hash].head, hash)
213 * LRU and Hash as needed.
220 int hash;
236 hash = CODA_NC_HASH(name, namelen, dcp);
237 cncp = coda_nc_find(dcp, name, namelen, cred, hash);
251 hash bucket length here, so we have to find the hash bucket
256 LIST_REMOVE(cncp, hash);
275 /* Insert into the lru and hash chains. */
277 LIST_INSERT_HEAD(&coda_nc_hash[hash].head, cncp, hash);
278 coda_nc_hash[hash].length++; /* Used for tuning */
291 int hash;
304 /* Use the hash function to locate the starting point,
309 hash = CODA_NC_HASH(name, namelen, dcp);
310 cncp = coda_nc_find(dcp, name, namelen, cred, hash);
322 /* move it to the front of the hash chain */
323 /* don't need to change the hash bucket length */
324 LIST_REMOVE(cncp, hash);
325 LIST_INSERT_HEAD(&coda_nc_hash[hash].head, cncp, hash);
339 * remove it from its hash chain, and
347 LIST_REMOVE(cncp, hash);
348 memset(&cncp->hash, 0, sizeof(cncp->hash));
399 ncncp = LIST_NEXT(cncp, hash);
433 ncncp = LIST_NEXT(cncp, hash);
468 /* use the hash function to locate the file, then zap all
472 int hash;
488 hash = CODA_NC_HASH(name, namelen, dcp);
489 cncp = coda_nc_find(dcp, name, namelen, 0, hash);
492 coda_nc_hash[hash].length--; /* Used for tuning */
495 cncp = coda_nc_find(dcp, name, namelen, 0, hash);
508 * via HASH or whatever and zap all entries which match the
515 int hash;
531 hash bucket length here, so we have to find the hash bucket
533 hash = CODA_NC_HASH(cncp->name, cncp->namelen, cncp->dcp);
534 coda_nc_hash[hash].length--; /* For performance tuning */
568 LIST_REMOVE(cncp, hash);
569 memset(&cncp->hash, 0, sizeof(cncp->hash));
606 * This routine should print out all the hash chains to the console.
611 int hash;
614 for (hash = 0; hash < coda_nc_hashsize; hash++) {
615 myprintf(("\nhash %d\n",hash));
617 LIST_FOREACH(cncp, &coda_nc_hash[hash].head, hash) {
665 * The purpose of this routine is to allow the hash and cache sizes to be
673 if ((hashsize % 2) || (heapsize % 2)) { /* Illegal hash or cache sizes */
707 LIST_FOREACH(cncp, &coda_nc_hash[i].head, hash) {