linux/net/sunrpc/xprtrdma
Chuck Lever 412055398b nfsd: Fix NFSv4 READ on RDMA when using readv
svcrdma expects that the payload falls precisely into the xdr_buf
page vector. This does not seem to be the case for
nfsd4_encode_readv().

This code is called only when fops->splice_read is missing or when
RQ_SPLICE_OK is clear, so it's not a noticeable problem in many
common cases.

Add new transport method: ->xpo_read_payload so that when a READ
payload does not fit exactly in rq_res's page vector, the XDR
encoder can inform the RPC transport exactly where that payload is,
without the payload's XDR pad.

That way, when a Write chunk is present, the transport knows what
byte range in the Reply message is supposed to be matched with the
chunk.

Note that the Linux NFS server implementation of NFS/RDMA can
currently handle only one Write chunk per RPC-over-RDMA message.
This simplifies the implementation of this fix.

Fixes: b042098063 ("nfsd4: allow exotic read compounds")
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=198053
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2020-03-16 12:04:31 -04:00
..
backchannel.c xprtrdma: Allocate and map transport header buffers at connect time 2020-01-15 10:54:32 -05:00
frwr_ops.c xprtrdma: Fix DMA scatter-gather list mapping imbalance 2020-02-13 15:35:33 -05:00
Makefile xprtrdma: Remove support for FMR memory registration 2019-01-02 12:05:17 -05:00
module.c NFS client updates for Linux 4.18 2018-06-12 10:09:03 -07:00
rpc_rdma.c xprtrdma: Allocate and map transport header buffers at connect time 2020-01-15 10:54:32 -05:00
svc_rdma_backchannel.c SUNRPC: Fix backchannel latency metrics 2019-11-21 17:05:14 -05:00
svc_rdma_recvfrom.c nfsd: Fix NFSv4 READ on RDMA when using readv 2020-03-16 12:04:31 -04:00
svc_rdma_rw.c nfsd: Fix NFSv4 READ on RDMA when using readv 2020-03-16 12:04:31 -04:00
svc_rdma_sendto.c nfsd: Fix NFSv4 READ on RDMA when using readv 2020-03-16 12:04:31 -04:00
svc_rdma_transport.c nfsd: Fix NFSv4 READ on RDMA when using readv 2020-03-16 12:04:31 -04:00
svc_rdma.c svcrdma: Remove svc_rdma_wq 2019-08-19 10:59:28 -04:00
transport.c xprtrdma: Eliminate per-transport "max pages" 2020-01-15 10:54:32 -05:00
verbs.c xprtrdma: DMA map rr_rdma_buf as each rpcrdma_rep is created 2020-01-15 10:54:32 -05:00
xprt_rdma.h xprtrdma: Allocate and map transport header buffers at connect time 2020-01-15 10:54:32 -05:00