[ewg] [PATCH OFED-1.4.1] NFS-RDMA: DMA direction error on NFS server

Jon Mason jon at opengridcomputing.com
Mon Apr 27 15:31:49 PDT 2009


This patch fixes an issue I am seeing on ppc64 when running on that
platform as a NFS Server.  The incorrect DMA direction causes an EEH
event.

This patch has already been sent upstream for inclusion into 2.6.30.

Signed-Off-By: Jon Mason <jon at opengridcomputing.com>
---

diff --git a/kernel_patches/fixes/nfsrdma_zz_0300_dma_direction.patch b/kernel_patches/fixes/nfsrdma_zz_0300_dma_direction.patch
new file mode 100644
index 0000000..e8bb90b
--- /dev/null
+++ b/kernel_patches/fixes/nfsrdma_zz_0300_dma_direction.patch
@@ -0,0 +1,24 @@
+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 at opengridcomputing.com>
+---
+
+ 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;
+



More information about the ewg mailing list