Lines Matching refs:serv
33 struct svc_serv *serv; member
40 static int nfs4_callback_up_net(struct svc_serv *serv, struct net *net) in nfs4_callback_up_net() argument
45 ret = svc_create_xprt(serv, "tcp", net, PF_INET, in nfs4_callback_up_net()
53 ret = svc_create_xprt(serv, "tcp", net, PF_INET6, in nfs4_callback_up_net()
103 struct svc_serv *serv = rqstp->rq_server; in nfs41_callback_svc() local
115 prepare_to_wait(&serv->sv_cb_waitq, &wq, TASK_INTERRUPTIBLE); in nfs41_callback_svc()
116 spin_lock_bh(&serv->sv_cb_lock); in nfs41_callback_svc()
117 if (!list_empty(&serv->sv_cb_list)) { in nfs41_callback_svc()
118 req = list_first_entry(&serv->sv_cb_list, in nfs41_callback_svc()
121 spin_unlock_bh(&serv->sv_cb_lock); in nfs41_callback_svc()
122 finish_wait(&serv->sv_cb_waitq, &wq); in nfs41_callback_svc()
124 error = bc_svc_process(serv, req, rqstp); in nfs41_callback_svc()
128 spin_unlock_bh(&serv->sv_cb_lock); in nfs41_callback_svc()
131 finish_wait(&serv->sv_cb_waitq, &wq); in nfs41_callback_svc()
140 struct svc_serv *serv) in nfs_callback_bc_serv() argument
147 xprt->bc_serv = serv; in nfs_callback_bc_serv()
151 struct svc_serv *serv) in nfs_callback_bc_serv() argument
157 struct svc_serv *serv) in nfs_callback_start_svc() argument
162 nfs_callback_bc_serv(minorversion, xprt, serv); in nfs_callback_start_svc()
167 if (serv->sv_nrthreads-1 == nrservs) in nfs_callback_start_svc()
170 ret = serv->sv_ops->svo_setup(serv, NULL, nrservs); in nfs_callback_start_svc()
172 serv->sv_ops->svo_setup(serv, NULL, 0); in nfs_callback_start_svc()
179 static void nfs_callback_down_net(u32 minorversion, struct svc_serv *serv, struct net *net) in nfs_callback_down_net() argument
187 svc_shutdown_net(serv, net); in nfs_callback_down_net()
190 static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, in nfs_callback_up_net() argument
201 ret = svc_bind(serv, net); in nfs_callback_up_net()
209 ret = nfs4_callback_up_net(serv, net); in nfs_callback_up_net()
211 ret = xprt->ops->bc_up(serv, net); in nfs_callback_up_net()
220 svc_rpcb_cleanup(serv, net); in nfs_callback_up_net()
256 struct svc_serv *serv; in nfs_callback_create_svc() local
262 if (cb_info->serv) { in nfs_callback_create_svc()
267 svc_get(cb_info->serv); in nfs_callback_create_svc()
268 return cb_info->serv; in nfs_callback_create_svc()
290 serv = svc_create_pooled(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, sv_ops); in nfs_callback_create_svc()
291 if (!serv) { in nfs_callback_create_svc()
295 cb_info->serv = serv; in nfs_callback_create_svc()
299 serv->sv_maxconn = 1024; in nfs_callback_create_svc()
301 return serv; in nfs_callback_create_svc()
309 struct svc_serv *serv; in nfs_callback_up() local
316 serv = nfs_callback_create_svc(minorversion); in nfs_callback_up()
317 if (IS_ERR(serv)) { in nfs_callback_up()
318 ret = PTR_ERR(serv); in nfs_callback_up()
322 ret = nfs_callback_up_net(minorversion, serv, net, xprt); in nfs_callback_up()
326 ret = nfs_callback_start_svc(minorversion, xprt, serv); in nfs_callback_up()
339 cb_info->serv = NULL; in nfs_callback_up()
340 svc_destroy(serv); in nfs_callback_up()
346 nfs_callback_down_net(minorversion, serv, net); in nfs_callback_up()
357 struct svc_serv *serv; in nfs_callback_down() local
360 serv = cb_info->serv; in nfs_callback_down()
361 nfs_callback_down_net(minorversion, serv, net); in nfs_callback_down()
364 svc_get(serv); in nfs_callback_down()
365 serv->sv_ops->svo_setup(serv, NULL, 0); in nfs_callback_down()
366 svc_destroy(serv); in nfs_callback_down()
368 cb_info->serv = NULL; in nfs_callback_down()