linux/fs/nfsd
Chuck Lever 512570b178 nfsd: Fix NFSv4 READ on RDMA when using readv
commit 412055398b upstream.

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>
Cc: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-11 15:33:42 +02:00
..
Kconfig
Makefile
acl.h
auth.c
auth.h
blocklayout.c
blocklayoutxdr.c
blocklayoutxdr.h
cache.h nfsd4: make drc_slab global, not per-net 2020-06-24 17:50:37 +02:00
current_stateid.h
export.c
export.h
fault_inject.c
filecache.c
filecache.h
flexfilelayout.c
flexfilelayoutxdr.c
flexfilelayoutxdr.h
idmap.h
lockd.c
netns.h nfsd4: make drc_slab global, not per-net 2020-06-24 17:50:37 +02:00
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c
nfs4acl.c
nfs4callback.c nfsd: Fix svc_xprt refcnt leak when setup callback client failed 2020-06-24 17:50:17 +02:00
nfs4idmap.c
nfs4layouts.c
nfs4proc.c
nfs4recover.c
nfs4state.c nfsd4: fix NULL dereference in nfsd/clients display code 2020-07-29 10:18:34 +02:00
nfs4xdr.c nfsd: Fix NFSv4 READ on RDMA when using readv 2020-08-11 15:33:42 +02:00
nfscache.c nfsd: safer handling of corrupted c_type 2020-06-24 17:50:38 +02:00
nfsctl.c nfsd: fix nfsdfs inode reference count leak 2020-07-09 09:37:53 +02:00
nfsd.h nfsd4: fix nfsdfs reference count loop 2020-07-09 09:37:53 +02:00
nfsfh.c
nfsfh.h
nfsproc.c
nfssvc.c
nfsxdr.c
pnfs.h
state.h
stats.c
stats.h
trace.c
trace.h
vfs.c nfsd: apply umask on fs without ACL support 2020-07-09 09:37:55 +02:00
vfs.h
xdr.h
xdr3.h
xdr4.h
xdr4cb.h