svcrdma: dma unmap the correct length for the RPCRDMA header page.
authorSteve Wise <swise@opengridcomputing.com>
Thu, 14 May 2009 21:34:28 +0000 (16:34 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 27 May 2009 22:57:24 +0000 (18:57 -0400)
commit98779be861a05c4cb75bed916df72ec0cba8b53d
tree6c7f51832c835cc3e98796fff83abc440edb3255
parent7f4218354fe312b327af06c3d8c95ed5f214c8ca
svcrdma: dma unmap the correct length for the RPCRDMA header page.

The svcrdma module was incorrectly unmapping the RPCRDMA header page.
On IBM pserver systems this causes a resource leak that results in
running out of bus address space (10 cthon iterations will reproduce it).
The code was mapping the full page but only unmapping the actual header
length.  The fix is to only map the header length.

I also cleaned up the use of ib_dma_map_page() calls since the unmap
logic always uses ib_dma_unmap_single().  I made these symmetrical.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
net/sunrpc/xprtrdma/svc_rdma_sendto.c
net/sunrpc/xprtrdma/svc_rdma_transport.c