]> git.openfabrics.org - ~emulex/infiniband.git/commit
RPCRDMA: Fix to XDR page base interpretation in marshalling logic.
authorTom Tucker <tom@ogc.us>
Wed, 9 Feb 2011 19:45:28 +0000 (19:45 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 11 Mar 2011 20:39:27 +0000 (15:39 -0500)
commitbd7ea31b9e8a342be76e0fe8d638343886c2d8c5
treebc56c61372dcd6ff08cca605f4eb7359ce025048
parentb064eca2cf6440bf9d5843b24cc4010624031694
RPCRDMA: Fix to XDR page base interpretation in marshalling logic.

The RPCRDMA marshalling logic assumed that xdr->page_base was an
offset into the first page of xdr->page_list. It is in fact an
offset into the xdr->page_list itself, that is, it selects the
first page in the page_list and the offset into that page.

The symptom depended in part on the rpc_memreg_strategy, if it was
FRMR, or some other one-shot mapping mode, the connection would get
torn down on a base and bounds error. When the badly marshalled RPC
was retransmitted it would reconnect, get the error, and tear down the
connection again in a loop forever. This resulted in a hung-mount. For
the other modes, it would result in silent data corruption. This bug is
most easily reproduced by writing more data than the filesystem
has space for.

This fix corrects the page_base assumption and otherwise simplifies
the iov mapping logic.

Signed-off-by: Tom Tucker <tom@ogc.us>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c