• Home
  • Raw
  • Download

Lines Matching full:req

54 static void xprt_free_allocation(struct rpc_rqst *req)  in xprt_free_allocation()  argument
58 dprintk("RPC: free allocations for req= %p\n", req); in xprt_free_allocation()
59 WARN_ON_ONCE(test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state)); in xprt_free_allocation()
60 xbufp = &req->rq_rcv_buf; in xprt_free_allocation()
62 xbufp = &req->rq_snd_buf; in xprt_free_allocation()
64 kfree(req); in xprt_free_allocation()
81 struct rpc_rqst *req; in xprt_alloc_bc_req() local
84 req = kzalloc(sizeof(*req), gfp_flags); in xprt_alloc_bc_req()
85 if (req == NULL) in xprt_alloc_bc_req()
88 req->rq_xprt = xprt; in xprt_alloc_bc_req()
89 INIT_LIST_HEAD(&req->rq_bc_list); in xprt_alloc_bc_req()
92 if (xprt_alloc_xdr_buf(&req->rq_rcv_buf, gfp_flags) < 0) { in xprt_alloc_bc_req()
96 req->rq_rcv_buf.len = PAGE_SIZE; in xprt_alloc_bc_req()
99 if (xprt_alloc_xdr_buf(&req->rq_snd_buf, gfp_flags) < 0) { in xprt_alloc_bc_req()
103 return req; in xprt_alloc_bc_req()
105 xprt_free_allocation(req); in xprt_alloc_bc_req()
137 struct rpc_rqst *req; in xprt_setup_bc() local
157 req = xprt_alloc_bc_req(xprt, GFP_KERNEL); in xprt_setup_bc()
158 if (req == NULL) { in xprt_setup_bc()
164 dprintk("RPC: adding req= %p\n", req); in xprt_setup_bc()
165 list_add(&req->rq_bc_pa_list, &tmp_list); in xprt_setup_bc()
186 req = list_first_entry(&tmp_list, in xprt_setup_bc()
189 list_del(&req->rq_bc_pa_list); in xprt_setup_bc()
190 xprt_free_allocation(req); in xprt_setup_bc()
215 struct rpc_rqst *req = NULL, *tmp = NULL; in xprt_destroy_bc() local
224 list_for_each_entry_safe(req, tmp, &xprt->bc_pa_list, rq_bc_pa_list) { in xprt_destroy_bc()
225 dprintk("RPC: req=%p\n", req); in xprt_destroy_bc()
226 list_del(&req->rq_bc_pa_list); in xprt_destroy_bc()
227 xprt_free_allocation(req); in xprt_destroy_bc()
243 struct rpc_rqst *req = NULL; in xprt_get_bc_request() local
255 req = list_first_entry(&xprt->bc_pa_list, struct rpc_rqst, in xprt_get_bc_request()
257 req->rq_reply_bytes_recvd = 0; in xprt_get_bc_request()
258 memcpy(&req->rq_private_buf, &req->rq_rcv_buf, in xprt_get_bc_request()
259 sizeof(req->rq_private_buf)); in xprt_get_bc_request()
260 req->rq_xid = xid; in xprt_get_bc_request()
261 req->rq_connect_cookie = xprt->connect_cookie; in xprt_get_bc_request()
262 dprintk("RPC: backchannel req=%p\n", req); in xprt_get_bc_request()
264 return req; in xprt_get_bc_request()
271 void xprt_free_bc_request(struct rpc_rqst *req) in xprt_free_bc_request() argument
273 struct rpc_xprt *xprt = req->rq_xprt; in xprt_free_bc_request()
275 xprt->ops->bc_free_rqst(req); in xprt_free_bc_request()
278 void xprt_free_bc_rqst(struct rpc_rqst *req) in xprt_free_bc_rqst() argument
280 struct rpc_xprt *xprt = req->rq_xprt; in xprt_free_bc_rqst()
282 dprintk("RPC: free backchannel req=%p\n", req); in xprt_free_bc_rqst()
284 req->rq_connect_cookie = xprt->connect_cookie - 1; in xprt_free_bc_rqst()
286 clear_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); in xprt_free_bc_rqst()
295 list_add_tail(&req->rq_bc_pa_list, &xprt->bc_pa_list); in xprt_free_bc_rqst()
298 req = NULL; in xprt_free_bc_rqst()
301 if (req != NULL) { in xprt_free_bc_rqst()
308 dprintk("RPC: Last session removed req=%p\n", req); in xprt_free_bc_rqst()
309 xprt_free_allocation(req); in xprt_free_bc_rqst()
327 struct rpc_rqst *req, *new = NULL; in xprt_lookup_bc_request() local
331 list_for_each_entry(req, &xprt->bc_pa_list, rq_bc_pa_list) { in xprt_lookup_bc_request()
332 if (req->rq_connect_cookie != xprt->connect_cookie) in xprt_lookup_bc_request()
334 if (req->rq_xid == xid) in xprt_lookup_bc_request()
337 req = xprt_get_bc_request(xprt, xid, new); in xprt_lookup_bc_request()
341 if (req != new) in xprt_lookup_bc_request()
344 } else if (req) in xprt_lookup_bc_request()
348 return req; in xprt_lookup_bc_request()
357 void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied) in xprt_complete_bc_request() argument
359 struct rpc_xprt *xprt = req->rq_xprt; in xprt_complete_bc_request()
363 list_del(&req->rq_bc_pa_list); in xprt_complete_bc_request()
367 req->rq_private_buf.len = copied; in xprt_complete_bc_request()
368 set_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); in xprt_complete_bc_request()
373 list_add(&req->rq_bc_list, &bc_serv->sv_cb_list); in xprt_complete_bc_request()