Lines Matching refs:host
55 struct nlm_host *host; in nlmclnt_init() local
63 host = nlmclnt_lookup_host(nlm_init->address, nlm_init->addrlen, in nlmclnt_init()
67 if (host == NULL) in nlmclnt_init()
69 if (host->h_rpcclnt == NULL && nlm_bind_host(host) == NULL) in nlmclnt_init()
72 return host; in nlmclnt_init()
74 nlmclnt_release_host(host); in nlmclnt_init()
86 void nlmclnt_done(struct nlm_host *host) in nlmclnt_done() argument
88 struct net *net = host->net; in nlmclnt_done()
90 nlmclnt_release_host(host); in nlmclnt_done()
98 struct nlm_wait *nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl) in nlmclnt_prepare_block() argument
104 block->b_host = host; in nlmclnt_prepare_block()
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()
240 host->h_name); in reclaimer()
246 down_write(&host->h_rwsem); in reclaimer()
249 dprintk("lockd: reclaiming locks for host %s\n", host->h_name); in reclaimer()
252 nsmstate = host->h_nsmstate; in reclaimer()
257 host->h_nextrebind = jiffies; in reclaimer()
258 nlm_rebind_host(host); in reclaimer()
261 list_splice_init(&host->h_granted, &host->h_reclaim); in reclaimer()
262 list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) { in reclaimer()
273 if (nlmclnt_reclaim(host, fl, req) != 0) in reclaimer()
275 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); in reclaimer()
276 if (host->h_nsmstate != nsmstate) { in reclaimer()
282 host->h_reclaiming = 0; in reclaimer()
283 up_write(&host->h_rwsem); in reclaimer()
284 dprintk("NLM: done reclaiming locks for host %s\n", host->h_name); in reclaimer()
289 if (block->b_host == host) { in reclaimer()
297 nlmclnt_release_host(host); in reclaimer()