linux/net/sunrpc/xprtrdma
Chuck Lever a97c331f9a svcrdma: Handle additional inline content
Most NFS RPCs place their large payload argument at the end of the
RPC header (eg, NFSv3 WRITE). For NFSv3 WRITE and SYMLINK, RPC/RDMA
sends the complete RPC header inline, and the payload argument in
the read list. Data in the read list is the last part of the XDR
stream.

One important case is not like this, however. NFSv4 COMPOUND is a
counted array of operations. A WRITE operation, with its large data
payload, can appear in the middle of the compound's operations
array. Thus NFSv4 WRITE compounds can have header content after the
WRITE payload.

The Linux client, for example, performs an NFSv4 WRITE like this:

  { PUTFH, WRITE, GETATTR }

Though RFC 5667 is not precise about this, the proper way to convey
this compound is to place the GETATTR inline, _after_ the front of
the RPC header. The receiver inserts the read list payload into the
XDR stream after the initial WRITE arguments, and before the GETATTR
operation, thanks to the value of the read list "position" field.

The Linux client currently sends the GETATTR at the end of the
RPC/RDMA read list, which is incorrect. It will be corrected in the
future.

The Linux server currently rejects NFSv4 compounds with inline
content after the read list. For the above NFSv4 WRITE compound, the
NFS compound header indicates there are three operations, but the
server finds nonsense when it looks in the XDR stream for the third
operation, and the compound fails with OP_ILLEGAL.

Move trailing inline content to the end of the XDR buffer's page
list. This presents incoming NFSv4 WRITE compounds to NFSD in the
same way the socket transport does.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2015-01-15 15:01:49 -05:00
..
Makefile xprtrdma: add separate Kconfig options for NFSoRDMA client and server support 2014-03-28 18:02:12 -04:00
rpc_rdma.c sunrpc: eliminate RPC_DEBUG 2014-11-24 17:31:46 -05:00
svc_rdma_marshal.c svcrdma: Clean up read chunk counting 2015-01-15 15:01:44 -05:00
svc_rdma_recvfrom.c svcrdma: Handle additional inline content 2015-01-15 15:01:49 -05:00
svc_rdma_sendto.c svcrdma: Find rmsgp more reliably 2015-01-15 15:01:45 -05:00
svc_rdma_transport.c svcrdma: Plant reader function in struct svcxprt_rdma 2015-01-15 15:01:46 -05:00
svc_rdma.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
transport.c NFS: Client side changes for RDMA 2014-11-26 17:37:13 -05:00
verbs.c NFS: Client side changes for RDMA 2014-11-26 17:37:13 -05:00
xprt_rdma.h xprtrdma: Cap req_cqinit 2014-11-25 13:39:20 -05:00