diff options
author | Steve Wise <swise@opengridcomputing.com> | 2009-04-03 15:18:24 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-04-25 18:11:14 -0400 |
commit | d0687be7c7ae21461da4438d5fd059b48487bfe1 (patch) | |
tree | 06036d8b604f6470a52a121aecd41f6e4a4cec23 | |
parent | 091069740304c979f957ceacec39c461d0192158 (diff) | |
download | op-kernel-dev-d0687be7c7ae21461da4438d5fd059b48487bfe1.zip op-kernel-dev-d0687be7c7ae21461da4438d5fd059b48487bfe1.tar.gz |
svcrdma: Fix dma map direction for rdma read targets
The nfs server rdma transport was mapping rdma read target pages for
TO_DEVICE instead of FROM_DEVICE. This causes data corruption on non
cache-coherent systems if frmrs are used.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index 629a287..42a6f9f 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c @@ -265,7 +265,7 @@ static int fast_reg_read_chunks(struct svcxprt_rdma *xprt, frmr->page_list->page_list[page_no] = ib_dma_map_single(xprt->sc_cm_id->device, page_address(rqstp->rq_arg.pages[page_no]), - PAGE_SIZE, DMA_TO_DEVICE); + PAGE_SIZE, DMA_FROM_DEVICE); if (ib_dma_mapping_error(xprt->sc_cm_id->device, frmr->page_list->page_list[page_no])) goto fatal_err; |