From 353ff6e4999b8b52273891dc00761c7e109556df Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 16 Aug 2012 10:44:42 -0700 Subject: [PATCH] NFSRDMA SLES11SP2 backport Signed-off-by: Jeff Becker --- ...s-for-RHEL6.2-RHEL6.3-and-SLES11-SP2.patch | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 patches/0020-nfsrdma-Backports-for-RHEL6.2-RHEL6.3-and-SLES11-SP2.patch 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 0000000..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 + } + + /* -- 2.41.0