svcrdma: Change DMA mapping logic to avoid the page_address kernel API
authorTom Tucker <tom@ogc.us>
Tue, 12 Oct 2010 20:33:52 +0000 (15:33 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 18 Oct 2010 23:51:31 +0000 (19:51 -0400)
commitb432e6b3d9c1b4271c43f02b45136f33a8ed5820
treebc557633646b380b8d5cc7e037a7ddc9036bbd2a
parentecec6e34e18660799444c5a163c7313a20fba701
svcrdma: Change DMA mapping logic to avoid the page_address kernel API

There was logic in the send path that assumed that a page containing data
to send to the client has a KVA. This is not always the case and can result
in data corruption when page_address returns zero and we end up DMA mapping
zero.

This patch changes the bus mapping logic to avoid page_address() where
necessary and converts all calls from ib_dma_map_single to ib_dma_map_page
in order to keep the map/unmap calls symmetric.

Signed-off-by: Tom Tucker <tom@ogc.us>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
net/sunrpc/xprtrdma/svc_rdma_sendto.c
net/sunrpc/xprtrdma/svc_rdma_transport.c