Re: [ewg] [PATCH] NFSRDMA SLES11SP2 backport

2012-08-20 Thread Vladimir Sokolovsky

On 08/16/2012 08:44 PM, Jeff Becker wrote:

Hi Vlad. Please apply attached patch to compat-rdma/compat-rdma.git. Thanks.

-jeff


Done,

Regards,
Vladimir
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] [PATCH] NFSRDMA SLES11SP2 backport

2012-08-16 Thread Jeff Becker

Hi Vlad. Please apply attached patch to compat-rdma/compat-rdma.git. Thanks.

-jeff
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
new file mode 100644
index 000..4f79a56
--- /dev/null
+++ b/patches/0020-nfsrdma-Backports-for-RHEL6.2-RHEL6.3-and-SLES11-SP2.patch
@@ -0,0 +1,54 @@
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c 2012-08-10 14:24:49.030166769 
-0700
 b/net/sunrpc/xprtrdma/svc_rdma_transport.c 2012-08-13 11:07:38.566980365 
-0700
+@@ -445,7 +445,11 @@
+ 
+   if (!cma_xprt)
+   return NULL;
++#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,3,0))
+   svc_xprt_init(init_net, svc_rdma_class, cma_xprt-sc_xprt, serv);
++#else
++  svc_xprt_init(svc_rdma_class, cma_xprt-sc_xprt, serv);
++#endif
+   INIT_LIST_HEAD(cma_xprt-sc_accept_q);
+   INIT_LIST_HEAD(cma_xprt-sc_dto_q);
+   INIT_LIST_HEAD(cma_xprt-sc_rq_dto_q);
+
+--- a/net/sunrpc/xprtrdma/transport.c  2012-08-10 14:24:49.030166769 -0700
 b/net/sunrpc/xprtrdma/transport.c  2012-08-15 10:30:17.125653683 -0700
+@@ -283,7 +283,9 @@
+   }
+ 
+   xprt = xprt_alloc(args-net, sizeof(struct rpcrdma_xprt),
++#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,1,0))
+   xprt_rdma_slot_table_entries,
++#endif
+   xprt_rdma_slot_table_entries);
+   if (xprt == NULL) {
+   dprintk(RPC:   %s: couldn't allocate rpcrdma_xprt\n,
+@@ -453,8 +455,14 @@
+ }
+ 
+ static int
++#if (LINUX_VERSION_CODE = KERNEL_VERSION(3,1,0))
+ xprt_rdma_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
+ {
++#else
++xprt_rdma_reserve_xprt(struct rpc_task *task)
++{
++  struct rpc_xprt *xprt = task-tk_xprt;
++#endif
+   struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
+   int credits = atomic_read(r_xprt-rx_buf.rb_credits);
+ 
+@@ -466,7 +474,11 @@
+   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))
+   return xprt_reserve_xprt_cong(xprt, task);
++#else
++  return xprt_reserve_xprt_cong(task);
++#endif
+ }
+ 
+ /*
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg