2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-02 02:34:05 +08:00
linux-next/include/linux/sunrpc
Chuck Lever 5fe6eaa1f9 SUNRPC: Generalize the RPC buffer allocation API
xprtrdma needs to allocate the Call and Reply buffers separately.
TBH, the reliance on using a single buffer for the pair of XDR
buffers is transport implementation-specific.

Transports that want to allocate separate Call and Reply buffers
will ignore the "size" argument anyway.  Don't bother passing it.

The buf_alloc method can't return two pointers. Instead, make the
method's return value an error code, and set the rq_buffer pointer
in the method itself.

This gives call_allocate an opportunity to terminate an RPC instead
of looping forever when a permanent problem occurs. If a request is
just bogus, or the transport is in a state where it can't allocate
resources for any request, there needs to be a way to kill the RPC
right there and not loop.

This immediately fixes a rare problem in the backchannel send path,
which loops if the server happens to send a CB request whose
call+reply size is larger than a page (which it shouldn't do yet).

One more issue: looks like xprt_inject_disconnect was incorrectly
placed in the failure path in call_allocate. It needs to be in the
success path, as it is for other call-sites.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2016-09-19 13:08:37 -04:00
..
addr.h SUNRPC: Drop double-underscores from __rpc_cmp_addr6() 2015-08-17 14:47:53 -05:00
auth_gss.h
auth.h Merge branch 'nfs-rdma' 2016-07-24 17:09:02 -04:00
bc_xprt.h SUNRPC: Abstract backchannel operations 2015-11-02 13:45:15 -05:00
cache.h sunrpc: remove 'inuse' flag from struct cache_detail. 2016-07-13 15:32:47 -04:00
clnt.h SUNRPC: rpc_clnt_add_xprt setup function for NFS layer 2016-09-19 13:08:36 -04:00
debug.h sunrpc: make debugfs file creation failure non-fatal 2015-04-23 14:42:27 -04:00
gss_api.h xprtrdma: No direct data placement with krb5i and krb5p 2016-07-11 15:50:43 -04:00
gss_asn1.h
gss_err.h
gss_krb5_enctypes.h
gss_krb5.h sunrpc: Use skcipher and ahash/shash 2016-01-27 20:36:01 +08:00
metrics.h
msg_prot.h sunrpc: Update RPCBIND_MAXNETIDLEN 2016-05-17 15:47:56 -04:00
rpc_pipe_fs.h
rpc_rdma.h xprtrdma: Properly handle RDMA_ERROR replies 2016-03-14 14:55:59 -04:00
sched.h SUNRPC: Generalize the RPC buffer allocation API 2016-09-19 13:08:37 -04:00
stats.h
svc_rdma.h svcrdma: Generalize svc_rdma_xdr_decode_req() 2016-05-13 15:53:06 -04:00
svc_xprt.h SUNRPC: Remove unused callback xpo_adjust_wspace() 2016-07-13 15:53:50 -04:00
svc.h SUNRPC: Add a server side per-connection limit 2016-07-13 15:53:48 -04:00
svcauth_gss.h
svcauth.h vfs: make the string hashes salt the hash 2016-06-10 20:21:46 -07:00
svcsock.h
timer.h
types.h
xdr.h SUNRPC: Refactor rpc_xdr_buf_init() 2016-09-19 13:08:37 -04:00
xprt.h SUNRPC: Generalize the RPC buffer allocation API 2016-09-19 13:08:37 -04:00
xprtmultipath.h SUNRPC search xprt switch for sockaddr 2016-09-19 13:08:36 -04:00
xprtrdma.h xprtrdma: Bound the inline threshold values 2016-05-17 15:47:57 -04:00
xprtsock.h SUNRPC: Small optimisation of client receive 2016-06-13 12:35:51 -04:00