Hi Vlad. Please apply the attached patch to compat-rdma/compat-rdma.git.
Thanks.
-jeff
commit 63a9a0f587f99bc3ef7b527727090b2b603fa053
Author: Jeffrey C. Becker <[email protected]>
Date: Fri Aug 24 11:08:57 2012 -0700
NFSRDMA: RHEL 6.3 backport
Signed-off-by: Jeff Becker <[email protected]>
diff --git a/config.mk b/config.mk
index 696d26c..6b65701 100644
--- a/config.mk
+++ b/config.mk
@@ -65,3 +65,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_38
ifdef CONFIG_COMPAT_SLES_11_2
NEED_MIN_DUMP_ALLOC_ARG=y
endif
+
+ifdef CONFIG_COMPAT_RHEL_6_3
+ CONFIG_COMPAT_XPRTRDMA_NEEDED=y
+endif
diff --git a/makefile b/makefile
index 8d04b9c..c286c6b 100644
--- a/makefile
+++ b/makefile
@@ -27,6 +27,11 @@ CFLAGS += \
-DCONFIG_COMPAT_SLES_11_2
endif
+ifneq ($(CONFIG_COMPAT_XPRTRDMA_NEEDED),)
+CFLAGS += \
+ -DCONFIG_COMPAT_XPRTRDMA_NEEDED
+endif
+
ifneq ($(NEED_MIN_DUMP_ALLOC_ARG),)
CFLAGS += \
-DNEED_MIN_DUMP_ALLOC_ARG
diff --git
a/patches/0020-nfsrdma-Backports-for-RHEL6.2-RHEL6.3-and-SLES11-SP2.patch
b/patches/0020-nfsrdma-Backports-for-RHEL6.2-RHEL6.3-and-SLES11-SP2.patch
index 4f79a56..22a9564 100644
--- a/patches/0020-nfsrdma-Backports-for-RHEL6.2-RHEL6.3-and-SLES11-SP2.patch
+++ b/patches/0020-nfsrdma-Backports-for-RHEL6.2-RHEL6.3-and-SLES11-SP2.patch
@@ -19,7 +19,7 @@
}
xprt = xprt_alloc(args->net, sizeof(struct rpcrdma_xprt),
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) ||
CONFIG_COMPAT_XPRTRDMA_NEEDED)
xprt_rdma_slot_table_entries,
+#endif
xprt_rdma_slot_table_entries);
@@ -29,7 +29,7 @@
}
static int
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) ||
CONFIG_COMPAT_XPRTRDMA_NEEDED)
xprt_rdma_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
{
+#else
@@ -44,7 +44,7 @@
BUG_ON(r_xprt->rx_buf.rb_cwndscale <= 0);
}
xprt->cwnd = credits * r_xprt->rx_buf.rb_cwndscale;
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) ||
CONFIG_COMPAT_XPRTRDMA_NEEDED)
return xprt_reserve_xprt_cong(xprt, task);
+#else
+ return xprt_reserve_xprt_cong(task);
@@ -52,3 +52,43 @@
}
/*
+
+--- a/net/sunrpc/xprtrdma/rpc_rdma.c 2012-08-10 14:24:49.029166778 -0700
++++ b/net/sunrpc/xprtrdma/rpc_rdma.c 2012-08-20 15:10:21.838979969 -0700
+@@ -338,9 +338,17 @@
+ curlen = copy_len;
+ dprintk("RPC: %s: page %d destp 0x%p len %d curlen %d\n",
+ __func__, i, destp, copy_len, curlen);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+ srcp = kmap_atomic(ppages[i]);
++#else
++ srcp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA);
++#endif
+ memcpy(destp, srcp+page_base, curlen);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+ kunmap_atomic(srcp);
++#else
++ kunmap_atomic(srcp, KM_SKB_SUNRPC_DATA);
++#endif
+ rqst->rq_svec[0].iov_len += curlen;
+ destp += curlen;
+ copy_len -= curlen;
+@@ -639,10 +647,18 @@
+ dprintk("RPC: %s: page %d"
+ " srcp 0x%p len %d curlen %d\n",
+ __func__, i, srcp, copy_len, curlen);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+ destp = kmap_atomic(ppages[i]);
++#else
++ destp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA);
++#endif
+ memcpy(destp + page_base, srcp, curlen);
+ flush_dcache_page(ppages[i]);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+ kunmap_atomic(destp);
++#else
++ kunmap_atomic(destp, KM_SKB_SUNRPC_DATA);
++#endif
+ srcp += curlen;
+ copy_len -= curlen;
+ if (copy_len == 0)
_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg