Lines Matching refs:host
47 struct nlm_host *host; in nlmclnt_init() local
55 host = nlmclnt_lookup_host(nlm_init->address, nlm_init->addrlen, in nlmclnt_init()
59 if (host == NULL) in nlmclnt_init()
61 if (host->h_rpcclnt == NULL && nlm_bind_host(host) == NULL) in nlmclnt_init()
64 host->h_nlmclnt_ops = nlm_init->nlmclnt_ops; in nlmclnt_init()
65 return host; in nlmclnt_init()
67 nlmclnt_release_host(host); in nlmclnt_init()
79 void nlmclnt_done(struct nlm_host *host) in nlmclnt_done() argument
81 struct net *net = host->net; in nlmclnt_done()
83 nlmclnt_release_host(host); in nlmclnt_done()
88 void nlmclnt_prepare_block(struct nlm_wait *block, struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block() argument
90 block->b_host = host; in nlmclnt_prepare_block()
96 struct rpc_clnt *nlmclnt_rpc_clnt(struct nlm_host *host) in nlmclnt_rpc_clnt() argument
98 return host->h_rpcclnt; in nlmclnt_rpc_clnt()
212 nlmclnt_recovery(struct nlm_host *host) in nlmclnt_recovery() argument
216 if (!host->h_reclaiming++) { in nlmclnt_recovery()
217 nlm_get_host(host); in nlmclnt_recovery()
218 task = kthread_run(reclaimer, host, "%s-reclaim", host->h_name); in nlmclnt_recovery()
222 "(%ld)\n", host->h_name, PTR_ERR(task)); in nlmclnt_recovery()
229 struct nlm_host *host = (struct nlm_host *) ptr; in reclaimer() local
234 struct net *net = host->net; in reclaimer()
242 down_write(&host->h_rwsem); in reclaimer()
245 dprintk("lockd: reclaiming locks for host %s\n", host->h_name); in reclaimer()
248 nsmstate = host->h_nsmstate; in reclaimer()
253 host->h_nextrebind = jiffies; in reclaimer()
254 nlm_rebind_host(host); in reclaimer()
257 list_splice_init(&host->h_granted, &host->h_reclaim); in reclaimer()
258 list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) { in reclaimer()
269 if (nlmclnt_reclaim(host, fl, req) != 0) in reclaimer()
271 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); in reclaimer()
272 if (host->h_nsmstate != nsmstate) { in reclaimer()
278 host->h_reclaiming = 0; in reclaimer()
279 up_write(&host->h_rwsem); in reclaimer()
280 dprintk("NLM: done reclaiming locks for host %s\n", host->h_name); in reclaimer()
285 if (block->b_host == host) { in reclaimer()
293 nlmclnt_release_host(host); in reclaimer()