android_kernel_xiaomi_sdm845/include/linux/sunrpc
Ricardo Labiaga fb7a0b9add nfs41: New backchannel helper routines
This patch introduces support to setup the callback xprt on the client side.
It allocates/ destroys the preallocated memory structures used to process
backchannel requests.

At setup time, xprt_setup_backchannel() is invoked to allocate one or
more rpc_rqst structures and substructures.  This ensures that they
are available when an RPC callback arrives.  The rpc_rqst structures
are maintained in a linked list attached to the rpc_xprt structure.
We keep track of the number of allocations so that they can be correctly
removed when the channel is destroyed.

When an RPC callback arrives, xprt_alloc_bc_request() is invoked to
obtain a preallocated rpc_rqst structure.  An rpc_xprt structure is
returned, and its RPC_BC_PREALLOC_IN_USE bit is set in
rpc_xprt->bc_flags.  The structure is removed from the the list
since it is now in use, and it will be later added back when its
user is done with it.

After the RPC callback replies, the rpc_rqst structure is returned
by invoking xprt_free_bc_request().  This clears the
RPC_BC_PREALLOC_IN_USE bit and adds it back to the list, allowing it
to be reused by a subsequent RPC callback request.

To be consistent with the reception of RPC messages, the backchannel requests
should be placed into the 'struct rpc_rqst' rq_rcv_buf, which is then in turn
copied to the 'struct rpc_rqst' rq_private_buf.

[nfs41: Preallocate rpc_rqst receive buffer for handling callbacks]
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[Update copyright notice and explain page allocation]
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2009-06-17 13:06:14 -07:00
..
auth_gss.h
auth.h
cache.h
clnt.h nfs41: sunrpc: Export the call prepare state for session reset 2009-06-17 12:25:07 -07:00
debug.h
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5.h
gss_spkm3.h
Kbuild
metrics.h
msg_prot.h
rpc_pipe_fs.h rpc: add an rpc_pipe_open method 2008-12-23 16:08:32 -05:00
rpc_rdma.h
sched.h nfs41: sunrpc: Export the call prepare state for session reset 2009-06-17 12:25:07 -07:00
stats.h
svc_rdma.h svcrdma: Modify the RPC recv path to use FRMR when available 2008-10-06 14:46:01 -05:00
svc_xprt.h SUNRPC: Change svc_create_xprt() to take a @family argument 2009-03-28 15:54:36 -04:00
svc.h nfs41: client callback structures 2009-06-17 13:06:13 -07:00
svcauth_gss.h nfsd: pass client principal name in rsc downcall 2008-12-23 16:17:15 -05:00
svcauth.h
svcsock.h NLM: Remove unused argument from svc_addsock() function 2008-10-04 17:12:27 -04:00
timer.h
types.h
xdr.h nfs: replace uses of __constant_{endian} 2009-03-18 17:30:51 -04:00
xprt.h nfs41: New backchannel helper routines 2009-06-17 13:06:14 -07:00
xprtrdma.h RPC/RDMA: harden connection logic against missing/late rdma_cm upcalls. 2008-10-10 15:13:31 -04:00
xprtsock.h