Lines Matching refs:serv

35 	struct svc_serv *serv;  member
42 static int nfs4_callback_up_net(struct svc_serv *serv, struct net *net) in nfs4_callback_up_net() argument
47 ret = svc_create_xprt(serv, "tcp", net, PF_INET, in nfs4_callback_up_net()
55 ret = svc_create_xprt(serv, "tcp", net, PF_INET6, in nfs4_callback_up_net()
105 struct svc_serv *serv = rqstp->rq_server; in nfs41_callback_svc() local
117 prepare_to_wait(&serv->sv_cb_waitq, &wq, TASK_INTERRUPTIBLE); in nfs41_callback_svc()
118 spin_lock_bh(&serv->sv_cb_lock); in nfs41_callback_svc()
119 if (!list_empty(&serv->sv_cb_list)) { in nfs41_callback_svc()
120 req = list_first_entry(&serv->sv_cb_list, in nfs41_callback_svc()
123 spin_unlock_bh(&serv->sv_cb_lock); in nfs41_callback_svc()
124 finish_wait(&serv->sv_cb_waitq, &wq); in nfs41_callback_svc()
126 error = bc_svc_process(serv, req, rqstp); in nfs41_callback_svc()
130 spin_unlock_bh(&serv->sv_cb_lock); in nfs41_callback_svc()
133 finish_wait(&serv->sv_cb_waitq, &wq); in nfs41_callback_svc()
142 struct svc_serv *serv) in nfs_callback_bc_serv() argument
149 xprt->bc_serv = serv; in nfs_callback_bc_serv()
153 struct svc_serv *serv) in nfs_callback_bc_serv() argument
159 struct svc_serv *serv) in nfs_callback_start_svc() argument
164 nfs_callback_bc_serv(minorversion, xprt, serv); in nfs_callback_start_svc()
169 if (serv->sv_nrthreads-1 == nrservs) in nfs_callback_start_svc()
172 ret = serv->sv_ops->svo_setup(serv, NULL, nrservs); in nfs_callback_start_svc()
174 serv->sv_ops->svo_setup(serv, NULL, 0); in nfs_callback_start_svc()
181 static void nfs_callback_down_net(u32 minorversion, struct svc_serv *serv, struct net *net) in nfs_callback_down_net() argument
189 svc_shutdown_net(serv, net); in nfs_callback_down_net()
192 static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, in nfs_callback_up_net() argument
203 ret = svc_bind(serv, net); in nfs_callback_up_net()
211 ret = nfs4_callback_up_net(serv, net); in nfs_callback_up_net()
213 ret = xprt->ops->bc_up(serv, net); in nfs_callback_up_net()
222 svc_rpcb_cleanup(serv, net); in nfs_callback_up_net()
259 struct svc_serv *serv; in nfs_callback_create_svc() local
264 if (cb_info->serv) { in nfs_callback_create_svc()
269 svc_get(cb_info->serv); in nfs_callback_create_svc()
270 return cb_info->serv; in nfs_callback_create_svc()
292 serv = svc_create_pooled(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, sv_ops); in nfs_callback_create_svc()
293 if (!serv) { in nfs_callback_create_svc()
297 cb_info->serv = serv; in nfs_callback_create_svc()
301 serv->sv_maxconn = 1024; in nfs_callback_create_svc()
303 return serv; in nfs_callback_create_svc()
311 struct svc_serv *serv; in nfs_callback_up() local
318 serv = nfs_callback_create_svc(minorversion); in nfs_callback_up()
319 if (IS_ERR(serv)) { in nfs_callback_up()
320 ret = PTR_ERR(serv); in nfs_callback_up()
324 ret = nfs_callback_up_net(minorversion, serv, net, xprt); in nfs_callback_up()
328 ret = nfs_callback_start_svc(minorversion, xprt, serv); in nfs_callback_up()
341 cb_info->serv = NULL; in nfs_callback_up()
342 svc_destroy(serv); in nfs_callback_up()
348 nfs_callback_down_net(minorversion, serv, net); in nfs_callback_up()
359 struct svc_serv *serv; in nfs_callback_down() local
362 serv = cb_info->serv; in nfs_callback_down()
363 nfs_callback_down_net(minorversion, serv, net); in nfs_callback_down()
366 svc_get(serv); in nfs_callback_down()
367 serv->sv_ops->svo_setup(serv, NULL, 0); in nfs_callback_down()
368 svc_destroy(serv); in nfs_callback_down()
370 cb_info->serv = NULL; in nfs_callback_down()