Lines Matching full:host
66 * If a host is inactive (and holds no locks) for this amount of
72 * We check the host list for idle every few seconds.
168 * A lock to protect the host list and waiting lock list.
198 * nh_pending list of the NLM host.
201 TAILQ_ENTRY(nlm_async_lock) af_link; /* (l) host's list of locks */
206 struct nlm_host *af_host; /* (c) host which is locking */
214 * NLM host.
232 char nh_caller_name[MAXNAMELEN]; /* (c) printable name of host */
235 struct sockaddr_storage nh_addr; /* (s) remote address of host */
238 rpcvers_t nh_vers; /* (s) NLM version of host */
239 int nh_state; /* (s) last seen NSM state of host */
241 time_t nh_idle_timeout; /* (s) Time at which host is idle */
488 * if the host is running a portmapper at all, we should be able in nlm_get_rpc()
503 "stat = %d, host = %s, port = %d\n", in nlm_get_rpc()
512 "stat = %d, host = %s, port = %d\n", in nlm_get_rpc()
562 * granted. We notify the host which initiated the request.
576 * Send the results back to the host. in nlm_lock_callback()
647 struct nlm_host *host = af->af_host; in nlm_cancel_async_lock() local
650 mtx_assert(&host->nh_lock, MA_OWNED); in nlm_cancel_async_lock()
652 mtx_unlock(&host->nh_lock); in nlm_cancel_async_lock()
665 mtx_lock(&host->nh_lock); in nlm_cancel_async_lock()
669 "cancelled\n", af, host->nh_caller_name, host->nh_sysid); in nlm_cancel_async_lock()
675 TAILQ_REMOVE(&host->nh_pending, af, af_link); in nlm_cancel_async_lock()
676 mtx_unlock(&host->nh_lock); in nlm_cancel_async_lock()
678 mtx_lock(&host->nh_lock); in nlm_cancel_async_lock()
685 nlm_check_expired_locks(struct nlm_host *host) in nlm_check_expired_locks() argument
690 mtx_lock(&host->nh_lock); in nlm_check_expired_locks()
691 while ((af = TAILQ_FIRST(&host->nh_granted)) != NULL in nlm_check_expired_locks()
697 TAILQ_REMOVE(&host->nh_granted, af, af_link); in nlm_check_expired_locks()
698 mtx_unlock(&host->nh_lock); in nlm_check_expired_locks()
700 mtx_lock(&host->nh_lock); in nlm_check_expired_locks()
702 while ((af = TAILQ_FIRST(&host->nh_finished)) != NULL) { in nlm_check_expired_locks()
703 TAILQ_REMOVE(&host->nh_finished, af, af_link); in nlm_check_expired_locks()
704 mtx_unlock(&host->nh_lock); in nlm_check_expired_locks()
706 mtx_lock(&host->nh_lock); in nlm_check_expired_locks()
708 mtx_unlock(&host->nh_lock); in nlm_check_expired_locks()
712 * Free resources used by a host. This is called after the reference
716 nlm_host_destroy(struct nlm_host *host) in nlm_host_destroy() argument
720 TAILQ_REMOVE(&nlm_hosts, host, nh_link); in nlm_host_destroy()
723 if (host->nh_srvrpc.nr_client) in nlm_host_destroy()
724 CLNT_RELEASE(host->nh_srvrpc.nr_client); in nlm_host_destroy()
725 if (host->nh_clntrpc.nr_client) in nlm_host_destroy()
726 CLNT_RELEASE(host->nh_clntrpc.nr_client); in nlm_host_destroy()
727 mtx_destroy(&host->nh_lock); in nlm_host_destroy()
728 sysctl_ctx_free(&host->nh_sysctl); in nlm_host_destroy()
729 free(host, M_NLM); in nlm_host_destroy()
738 struct nlm_host *host = (struct nlm_host *) arg; in nlm_client_recovery_start() local
741 host->nh_caller_name); in nlm_client_recovery_start()
743 nlm_client_recovery(host); in nlm_client_recovery_start()
746 host->nh_caller_name); in nlm_client_recovery_start()
748 host->nh_monstate = NLM_MONITORED; in nlm_client_recovery_start()
749 nlm_host_release(host); in nlm_client_recovery_start()
755 * This is called when we receive a host state change notification. We
756 * unlock any active locks owned by the host. When rpc.lockd is
762 nlm_host_notify(struct nlm_host *host, int newstate) in nlm_host_notify() argument
767 NLM_DEBUG(1, "NLM: host %s (sysid %d) rebooted, new " in nlm_host_notify()
768 "state is %d\n", host->nh_caller_name, in nlm_host_notify()
769 host->nh_sysid, newstate); in nlm_host_notify()
773 * Cancel any pending async locks for this host. in nlm_host_notify()
775 mtx_lock(&host->nh_lock); in nlm_host_notify()
776 while ((af = TAILQ_FIRST(&host->nh_pending)) != NULL) { in nlm_host_notify()
783 mtx_unlock(&host->nh_lock); in nlm_host_notify()
784 nlm_check_expired_locks(host); in nlm_host_notify()
787 * The host just rebooted - trash its locks. in nlm_host_notify()
789 lf_clearremotesys(host->nh_sysid); in nlm_host_notify()
790 host->nh_state = newstate; in nlm_host_notify()
793 * If we have any remote locks for this host (i.e. it in nlm_host_notify()
798 && host->nh_monstate != NLM_RECOVERING in nlm_host_notify()
799 && lf_countlocks(NLM_SYSID_CLIENT | host->nh_sysid) > 0) { in nlm_host_notify()
801 host->nh_monstate = NLM_RECOVERING; in nlm_host_notify()
802 refcount_acquire(&host->nh_refs); in nlm_host_notify()
803 kthread_add(nlm_client_recovery_start, host, curproc, &td, 0, 0, in nlm_host_notify()
804 "NFS lock recovery for %s", host->nh_caller_name); in nlm_host_notify()
814 struct nlm_host *host; in nlm_host_lock_count_sysctl() local
817 host = oidp->oid_arg1; in nlm_host_lock_count_sysctl()
818 count = lf_countlocks(host->nh_sysid); in nlm_host_lock_count_sysctl()
828 struct nlm_host *host; in nlm_host_client_lock_count_sysctl() local
831 host = oidp->oid_arg1; in nlm_host_client_lock_count_sysctl()
832 count = lf_countlocks(NLM_SYSID_CLIENT | host->nh_sysid); in nlm_host_client_lock_count_sysctl()
837 * Create a new NLM host.
842 struct nlm_host *host; in nlm_create_host() local
847 NLM_DEBUG(1, "NLM: new host %s (sysid %d)\n", in nlm_create_host()
849 host = malloc(sizeof(struct nlm_host), M_NLM, M_NOWAIT|M_ZERO); in nlm_create_host()
850 if (!host) in nlm_create_host()
852 mtx_init(&host->nh_lock, "nh_lock", NULL, MTX_DEF); in nlm_create_host()
853 refcount_init(&host->nh_refs, 1); in nlm_create_host()
854 strlcpy(host->nh_caller_name, caller_name, MAXNAMELEN); in nlm_create_host()
855 host->nh_sysid = nlm_next_sysid++; in nlm_create_host()
856 snprintf(host->nh_sysid_string, sizeof(host->nh_sysid_string), in nlm_create_host()
857 "%d", host->nh_sysid); in nlm_create_host()
858 host->nh_vers = 0; in nlm_create_host()
859 host->nh_state = 0; in nlm_create_host()
860 host->nh_monstate = NLM_UNMONITORED; in nlm_create_host()
861 host->nh_grantcookie = 1; in nlm_create_host()
862 TAILQ_INIT(&host->nh_pending); in nlm_create_host()
863 TAILQ_INIT(&host->nh_granted); in nlm_create_host()
864 TAILQ_INIT(&host->nh_finished); in nlm_create_host()
865 TAILQ_INSERT_TAIL(&nlm_hosts, host, nh_link); in nlm_create_host()
869 sysctl_ctx_init(&host->nh_sysctl); in nlm_create_host()
870 oid = SYSCTL_ADD_NODE(&host->nh_sysctl, in nlm_create_host()
872 OID_AUTO, host->nh_sysid_string, CTLFLAG_RD | CTLFLAG_MPSAFE, in nlm_create_host()
874 SYSCTL_ADD_STRING(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, in nlm_create_host()
875 "hostname", CTLFLAG_RD, host->nh_caller_name, 0, ""); in nlm_create_host()
876 SYSCTL_ADD_UINT(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, in nlm_create_host()
877 "version", CTLFLAG_RD, &host->nh_vers, 0, ""); in nlm_create_host()
878 SYSCTL_ADD_UINT(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, in nlm_create_host()
879 "monitored", CTLFLAG_RD, &host->nh_monstate, 0, ""); in nlm_create_host()
880 SYSCTL_ADD_PROC(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, in nlm_create_host()
881 "lock_count", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, host, in nlm_create_host()
883 SYSCTL_ADD_PROC(&host->nh_sysctl, SYSCTL_CHILDREN(oid), OID_AUTO, in nlm_create_host()
885 host, 0, nlm_host_client_lock_count_sysctl, "I", ""); in nlm_create_host()
889 return (host); in nlm_create_host()
941 * the host structure here, possibly after a larger timeout but that
948 struct nlm_host *host; in nlm_check_idle() local
957 TAILQ_FOREACH(host, &nlm_hosts, nh_link) { in nlm_check_idle()
958 if (host->nh_monstate == NLM_MONITORED in nlm_check_idle()
959 && time_uptime > host->nh_idle_timeout) { in nlm_check_idle()
961 if (lf_countlocks(host->nh_sysid) > 0 in nlm_check_idle()
963 + host->nh_sysid)) { in nlm_check_idle()
964 host->nh_idle_timeout = in nlm_check_idle()
969 nlm_host_unmonitor(host); in nlm_check_idle()
976 * Search for an existing NLM host that matches the given name
978 * found, create a new host. If 'addr' is non-NULL, record the remote
979 * address of the host so that we can call it back for async
987 struct nlm_host *host; in nlm_find_host_by_name() local
992 * The remote host is determined by caller_name. in nlm_find_host_by_name()
994 TAILQ_FOREACH(host, &nlm_hosts, nh_link) { in nlm_find_host_by_name()
995 if (!strcmp(host->nh_caller_name, name)) in nlm_find_host_by_name()
999 if (!host) { in nlm_find_host_by_name()
1000 host = nlm_create_host(name); in nlm_find_host_by_name()
1001 if (!host) { in nlm_find_host_by_name()
1006 refcount_acquire(&host->nh_refs); in nlm_find_host_by_name()
1008 host->nh_idle_timeout = time_uptime + NLM_IDLE_TIMEOUT; in nlm_find_host_by_name()
1011 * If we have an address for the host, record it so that we in nlm_find_host_by_name()
1024 if (host->nh_addr.ss_len && host->nh_srvrpc.nr_client) { in nlm_find_host_by_name()
1026 (struct sockaddr *) &host->nh_addr, in nlm_find_host_by_name()
1028 || host->nh_vers != vers) { in nlm_find_host_by_name()
1030 mtx_lock(&host->nh_lock); in nlm_find_host_by_name()
1031 client = host->nh_srvrpc.nr_client; in nlm_find_host_by_name()
1032 host->nh_srvrpc.nr_client = NULL; in nlm_find_host_by_name()
1033 mtx_unlock(&host->nh_lock); in nlm_find_host_by_name()
1039 memcpy(&host->nh_addr, addr, addr->sa_len); in nlm_find_host_by_name()
1040 host->nh_vers = vers; in nlm_find_host_by_name()
1047 return (host); in nlm_find_host_by_name()
1051 * Search for an existing NLM host that matches the given remote
1052 * address. If none is found, create a new host with the requested
1054 * that host.
1064 struct nlm_host *host; in nlm_find_host_by_addr() local
1086 * The remote host is determined by caller_name. in nlm_find_host_by_addr()
1088 TAILQ_FOREACH(host, &nlm_hosts, nh_link) { in nlm_find_host_by_addr()
1090 (const struct sockaddr *) &host->nh_addr)) in nlm_find_host_by_addr()
1094 if (!host) { in nlm_find_host_by_addr()
1095 host = nlm_create_host(tmp); in nlm_find_host_by_addr()
1096 if (!host) { in nlm_find_host_by_addr()
1100 memcpy(&host->nh_addr, addr, addr->sa_len); in nlm_find_host_by_addr()
1101 host->nh_vers = vers; in nlm_find_host_by_addr()
1103 refcount_acquire(&host->nh_refs); in nlm_find_host_by_addr()
1105 host->nh_idle_timeout = time_uptime + NLM_IDLE_TIMEOUT; in nlm_find_host_by_addr()
1111 return (host); in nlm_find_host_by_addr()
1115 * Find the NLM host that matches the value of 'sysid'. If none
1121 struct nlm_host *host; in nlm_find_host_by_sysid() local
1123 TAILQ_FOREACH(host, &nlm_hosts, nh_link) { in nlm_find_host_by_sysid()
1124 if (host->nh_sysid == sysid) { in nlm_find_host_by_sysid()
1125 refcount_acquire(&host->nh_refs); in nlm_find_host_by_sysid()
1126 return (host); in nlm_find_host_by_sysid()
1133 void nlm_host_release(struct nlm_host *host) in nlm_host_release() argument
1135 if (refcount_release(&host->nh_refs)) { in nlm_host_release()
1137 * Free the host in nlm_host_release()
1139 nlm_host_destroy(host); in nlm_host_release()
1144 * Unregister this NLM host with the local NSM due to idleness.
1147 nlm_host_unmonitor(struct nlm_host *host) in nlm_host_unmonitor() argument
1155 host->nh_caller_name, host->nh_sysid); in nlm_host_unmonitor()
1159 * make it simpler to find the host if we are notified of a in nlm_host_unmonitor()
1160 * host restart. in nlm_host_unmonitor()
1162 smmonid.mon_name = host->nh_caller_name; in nlm_host_unmonitor()
1180 host->nh_caller_name); in nlm_host_unmonitor()
1184 host->nh_monstate = NLM_UNMONITORED; in nlm_host_unmonitor()
1188 * Register this NLM host with the local NSM so that we can be
1192 nlm_host_monitor(struct nlm_host *host, int state) in nlm_host_monitor() argument
1199 if (state && !host->nh_state) { in nlm_host_monitor()
1202 * value for this host. We record it here to help in nlm_host_monitor()
1203 * detect host reboots. in nlm_host_monitor()
1205 host->nh_state = state; in nlm_host_monitor()
1206 NLM_DEBUG(1, "NLM: host %s (sysid %d) has NSM state %d\n", in nlm_host_monitor()
1207 host->nh_caller_name, host->nh_sysid, state); in nlm_host_monitor()
1210 mtx_lock(&host->nh_lock); in nlm_host_monitor()
1211 if (host->nh_monstate != NLM_UNMONITORED) { in nlm_host_monitor()
1212 mtx_unlock(&host->nh_lock); in nlm_host_monitor()
1215 host->nh_monstate = NLM_MONITORED; in nlm_host_monitor()
1216 mtx_unlock(&host->nh_lock); in nlm_host_monitor()
1219 host->nh_caller_name, host->nh_sysid); in nlm_host_monitor()
1223 * make it simpler to find the host if we are notified of a in nlm_host_monitor()
1224 * host restart. in nlm_host_monitor()
1226 smmon.mon_id.mon_name = host->nh_caller_name; in nlm_host_monitor()
1231 memcpy(smmon.priv, &host->nh_sysid, sizeof(host->nh_sysid)); in nlm_host_monitor()
1245 host->nh_caller_name); in nlm_host_monitor()
1246 mtx_lock(&host->nh_lock); in nlm_host_monitor()
1247 host->nh_monstate = NLM_MONITOR_FAILED; in nlm_host_monitor()
1248 mtx_unlock(&host->nh_lock); in nlm_host_monitor()
1252 host->nh_monstate = NLM_MONITORED; in nlm_host_monitor()
1257 * running on the given host.
1260 nlm_host_get_rpc(struct nlm_host *host, bool_t isserver) in nlm_host_get_rpc() argument
1265 mtx_lock(&host->nh_lock); in nlm_host_get_rpc()
1268 rpc = &host->nh_srvrpc; in nlm_host_get_rpc()
1270 rpc = &host->nh_clntrpc; in nlm_host_get_rpc()
1283 mtx_unlock(&host->nh_lock); in nlm_host_get_rpc()
1285 mtx_lock(&host->nh_lock); in nlm_host_get_rpc()
1289 mtx_unlock(&host->nh_lock); in nlm_host_get_rpc()
1290 client = nlm_get_rpc((struct sockaddr *)&host->nh_addr, in nlm_host_get_rpc()
1291 NLM_PROG, host->nh_vers); in nlm_host_get_rpc()
1292 mtx_lock(&host->nh_lock); in nlm_host_get_rpc()
1296 mtx_unlock(&host->nh_lock); in nlm_host_get_rpc()
1298 mtx_lock(&host->nh_lock); in nlm_host_get_rpc()
1309 mtx_unlock(&host->nh_lock); in nlm_host_get_rpc()
1315 int nlm_host_get_sysid(struct nlm_host *host) in nlm_host_get_sysid() argument
1318 return (host->nh_sysid); in nlm_host_get_sysid()
1322 nlm_host_get_state(struct nlm_host *host) in nlm_host_get_state() argument
1325 return (host->nh_state); in nlm_host_get_state()
1541 struct nlm_host *host, *nhost; in nlm_server_main() local
1679 * nlm_hosts to the host (which may remove it from the list in nlm_server_main()
1688 TAILQ_FOREACH_SAFE(host, &nlm_hosts, nh_link, nhost) { in nlm_server_main()
1690 nlm_host_notify(host, 0); in nlm_server_main()
1691 nlm_host_release(host); in nlm_server_main()
1727 struct nlm_host *host; in nlm_sm_notify() local
1731 host = nlm_find_host_by_sysid(sysid); in nlm_sm_notify()
1732 if (host) { in nlm_sm_notify()
1733 nlm_host_notify(host, argp->state); in nlm_sm_notify()
1734 nlm_host_release(host); in nlm_sm_notify()
1751 nlm_get_vfs_state(struct nlm_host *host, struct svc_req *rqstp, in nlm_get_vfs_state() argument
1768 (struct sockaddr *)&host->nh_addr, &exflags, &credanon, in nlm_get_vfs_state()
1855 struct nlm_host *host, *bhost; in nlm_do_test() local
1863 host = nlm_find_host_by_name(argp->alock.caller_name, in nlm_do_test()
1865 if (!host) { in nlm_do_test()
1871 host->nh_caller_name, host->nh_sysid); in nlm_do_test()
1873 nlm_check_expired_locks(host); in nlm_do_test()
1874 sysid = host->nh_sysid; in nlm_do_test()
1885 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_test()
1919 * a space for the owning host's name allowing in nlm_do_test()
1925 * the first four bytes of the host in nlm_do_test()
1942 *rpcp = nlm_host_get_rpc(host, TRUE); in nlm_do_test()
1943 nlm_host_release(host); in nlm_do_test()
1953 struct nlm_host *host; in nlm_do_lock() local
1961 host = nlm_find_host_by_name(argp->alock.caller_name, in nlm_do_lock()
1963 if (!host) { in nlm_do_lock()
1969 host->nh_caller_name, host->nh_sysid); in nlm_do_lock()
1971 if (monitor && host->nh_state && argp->state in nlm_do_lock()
1972 && host->nh_state != argp->state) { in nlm_do_lock()
1974 * The host rebooted without telling us. Trash its in nlm_do_lock()
1977 nlm_host_notify(host, argp->state); in nlm_do_lock()
1980 nlm_check_expired_locks(host); in nlm_do_lock()
1981 sysid = host->nh_sysid; in nlm_do_lock()
1992 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_lock()
2013 * First, make sure we can contact the host's NLM. in nlm_do_lock()
2015 client = nlm_host_get_rpc(host, TRUE); in nlm_do_lock()
2027 mtx_lock(&host->nh_lock); in nlm_do_lock()
2028 TAILQ_FOREACH(af, &host->nh_pending, af_link) { in nlm_do_lock()
2037 cookie.ng_sysid = host->nh_sysid; in nlm_do_lock()
2038 cookie.ng_cookie = host->nh_grantcookie++; in nlm_do_lock()
2040 mtx_unlock(&host->nh_lock); in nlm_do_lock()
2052 af->af_host = host; in nlm_do_lock()
2079 mtx_lock(&host->nh_lock); in nlm_do_lock()
2080 TAILQ_INSERT_TAIL(&host->nh_pending, af, af_link); in nlm_do_lock()
2081 mtx_unlock(&host->nh_lock); in nlm_do_lock()
2092 mtx_lock(&host->nh_lock); in nlm_do_lock()
2093 TAILQ_REMOVE(&host->nh_pending, af, af_link); in nlm_do_lock()
2094 mtx_unlock(&host->nh_lock); in nlm_do_lock()
2100 "(sysid %d)\n", af, host->nh_caller_name, sysid); in nlm_do_lock()
2124 nlm_host_monitor(host, argp->state); in nlm_do_lock()
2131 *rpcp = nlm_host_get_rpc(host, TRUE); in nlm_do_lock()
2132 nlm_host_release(host); in nlm_do_lock()
2142 struct nlm_host *host; in nlm_do_cancel() local
2150 host = nlm_find_host_by_name(argp->alock.caller_name, in nlm_do_cancel()
2152 if (!host) { in nlm_do_cancel()
2158 host->nh_caller_name, host->nh_sysid); in nlm_do_cancel()
2160 nlm_check_expired_locks(host); in nlm_do_cancel()
2161 sysid = host->nh_sysid; in nlm_do_cancel()
2171 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_cancel()
2191 mtx_lock(&host->nh_lock); in nlm_do_cancel()
2193 TAILQ_FOREACH(af, &host->nh_pending, af_link) { in nlm_do_cancel()
2203 mtx_unlock(&host->nh_lock); in nlm_do_cancel()
2216 mtx_unlock(&host->nh_lock); in nlm_do_cancel()
2221 *rpcp = nlm_host_get_rpc(host, TRUE); in nlm_do_cancel()
2222 nlm_host_release(host); in nlm_do_cancel()
2232 struct nlm_host *host; in nlm_do_unlock() local
2239 host = nlm_find_host_by_name(argp->alock.caller_name, in nlm_do_unlock()
2241 if (!host) { in nlm_do_unlock()
2247 host->nh_caller_name, host->nh_sysid); in nlm_do_unlock()
2249 nlm_check_expired_locks(host); in nlm_do_unlock()
2250 sysid = host->nh_sysid; in nlm_do_unlock()
2260 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, (accmode_t)0); in nlm_do_unlock()
2283 *rpcp = nlm_host_get_rpc(host, TRUE); in nlm_do_unlock()
2284 nlm_host_release(host); in nlm_do_unlock()
2293 struct nlm_host *host; in nlm_do_granted() local
2298 host = nlm_find_host_by_addr(svc_getrpccaller(rqstp), rqstp->rq_vers); in nlm_do_granted()
2299 if (!host) { in nlm_do_granted()
2328 *rpcp = nlm_host_get_rpc(host, TRUE); in nlm_do_granted()
2329 nlm_host_release(host); in nlm_do_granted()
2336 struct nlm_host *host = NULL; in nlm_do_granted_res() local
2345 host = nlm_find_host_by_sysid(ng_sysid(&argp->cookie)); in nlm_do_granted_res()
2346 if (!host) { in nlm_do_granted_res()
2347 NLM_DEBUG(1, "NLM: Unknown host rejected our grant"); in nlm_do_granted_res()
2351 mtx_lock(&host->nh_lock); in nlm_do_granted_res()
2352 TAILQ_FOREACH(af, &host->nh_granted, af_link) in nlm_do_granted_res()
2357 TAILQ_REMOVE(&host->nh_granted, af, af_link); in nlm_do_granted_res()
2358 mtx_unlock(&host->nh_lock); in nlm_do_granted_res()
2361 NLM_DEBUG(1, "NLM: host %s (sysid %d) replied to our grant " in nlm_do_granted_res()
2362 "with unrecognized cookie %d:%d", host->nh_caller_name, in nlm_do_granted_res()
2363 host->nh_sysid, ng_sysid(&argp->cookie), in nlm_do_granted_res()
2372 NLM_DEBUG(1, "NLM: host %s (sysid %d) rejected our grant " in nlm_do_granted_res()
2373 "and we failed to unlock (%d)", host->nh_caller_name, in nlm_do_granted_res()
2374 host->nh_sysid, error); in nlm_do_granted_res()
2378 NLM_DEBUG(5, "NLM: async lock %p rejected by host %s (sysid %d)", in nlm_do_granted_res()
2379 af, host->nh_caller_name, host->nh_sysid); in nlm_do_granted_res()
2381 NLM_DEBUG(5, "NLM: async lock %p accepted by host %s (sysid %d)", in nlm_do_granted_res()
2382 af, host->nh_caller_name, host->nh_sysid); in nlm_do_granted_res()
2388 if (host) in nlm_do_granted_res()
2389 nlm_host_release(host); in nlm_do_granted_res()
2395 struct nlm_host *host, *thost; in nlm_do_free_all() local
2397 TAILQ_FOREACH_SAFE(host, &nlm_hosts, nh_link, thost) { in nlm_do_free_all()
2398 if (!strcmp(host->nh_caller_name, argp->name)) in nlm_do_free_all()
2399 nlm_host_notify(host, argp->state); in nlm_do_free_all()