Home | History | Annotate | Download | only in common

Lines Matching defs:fhe

214 	    ("%d reqs on destroyed fhe %p", e->num_rw, e));
216 ("%d exclusive reqs on destroyed fhe %p", e->num_exclusive, e));
218 ("%d threads on destroyed fhe %p", e->num_threads, e));
236 struct fha_hash_entry *fhe, *new_fhe;
243 LIST_FOREACH(fhe, &fhs->list, link)
244 if (fhe->fh == fh)
246 if (!fhe) {
247 fhe = new_fhe;
248 LIST_INSERT_HEAD(&fhs->list, fhe, link);
251 return (fhe);
255 fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread)
258 mtx_assert(fhe->mtx, MA_OWNED);
260 LIST_INSERT_HEAD(&fhe->threads, thread, st_alink);
261 fhe->num_threads++;
265 fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread)
268 mtx_assert(fhe->mtx, MA_OWNED);
272 fhe->num_threads--;
279 fha_hash_entry_add_op(struct fha_hash_entry *fhe, int locktype, int count)
282 mtx_assert(fhe->mtx, MA_OWNED);
284 fhe->num_exclusive += count;
286 fhe->num_rw += count;
290 * Get the service thread currently associated with the fhe that is
295 struct fha_hash_entry *fhe, struct fha_info *i, SVCTHREAD *this_thread)
304 LIST_FOREACH(thread, &fhe->threads, st_alink) {
308 if (fhe->num_exclusive) {
358 (fhe->num_threads < softc->ctls.max_nfsds_per_fh)) {
364 fha_hash_entry_add_thread(fhe, thread);
386 struct fha_hash_entry *fhe;
410 fhe = fha_hash_entry_lookup(softc, i.fh);
411 req->rq_p1 = fhe;
419 thread = fha_hash_entry_choose_thread(softc, fhe, &i, this_thread);
421 fha_hash_entry_add_op(fhe, i.locktype, 1);
427 * the new request inserted to its queue while we drop fhe lock.
430 mtx_unlock(fhe->mtx);
446 struct fha_hash_entry *fhe = req->rq_p1;
453 if (!fhe)
456 mtx = fhe->mtx;
458 fha_hash_entry_add_op(fhe, req->rq_p2, -1);
463 fha_hash_entry_remove_thread(fhe, thread);
464 if (0 == fhe->num_rw + fhe->num_exclusive)
465 fha_hash_entry_remove(fhe);
475 struct fha_hash_entry *fhe;
508 LIST_FOREACH(fhe, &softc->fha_hash[i].list, link) {
509 sbuf_printf(&sb, "%sfhe %p: {\n", first ? " " : ", ", fhe);
511 sbuf_printf(&sb, " fh: %ju\n", (uintmax_t) fhe->fh);
513 fhe->num_rw, fhe->num_exclusive);
514 sbuf_printf(&sb, " num_threads: %d\n", fhe->num_threads);
516 LIST_FOREACH(thread, &fhe->threads, st_alink) {