]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix large reads on NFS/RDMA
authorChuck Lever <chuck.lever@oracle.com>
Wed, 12 Mar 2014 16:51:30 +0000 (12:51 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 17 Mar 2014 19:30:38 +0000 (15:30 -0400)
commit61b7c8edc2ba3753874cc4b1e86b988b00f8cb62
treeb9cc2e05eb59dc9dc6e874cf228171e8b72d013b
parentc1089beb0816de4424050b4a10c0778bbdcc835e
SUNRPC: Fix large reads on NFS/RDMA

After commit 1200335b, "SUNRPC: Optimise away unnecessary data moves
in xdr_align_pages", Thu Aug 2 13:21:43 2012, READs larger than a
few hundred bytes via NFS/RDMA no longer work.  This commit exposed
a long-standing bug in rpcrdma_inline_fixup().

I reproduce this with an rsize=4096 mount using the cthon04 basic
tests.  Test 5 fails with an EIO error.

For my reproducer, kernel log shows:

  NFS: server cheating in read reply: count 4096 > recvd 0

rpcrdma_inline_fixup() is zeroing the xdr_stream::page_len field,
and xdr_align_pages() is now returning that value to the READ XDR
decoder function.

That field is set up by xdr_inline_pages() by the READ XDR encoder
function.  As far as I can tell, it is supposed to be left alone
after that, as it describes the dimensions of the reply xdr_stream,
not the contents of that stream.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68391
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/xprtrdma/rpc_rdma.c