It contains NFSRDMA port for 2.6.38. Thanks.

-jeff
>From d35ba9ddcc3231ec2a104d9fea6e0aa017ea92d9 Mon Sep 17 00:00:00 2001
From: Jeff Becker <[email protected]>
Date: Mon, 28 Nov 2011 11:18:26 -0800
Subject: [PATCH] NFSRDMA: Pull in patches for 2.6.38
 Signed-off-by: Jeff Becker <[email protected]>

---
 ...ve-duplicate-universal-address-generation.patch |   42 +++++
 ...rpc_ntop-for-constructing-transport-addre.patch |   74 +++++++++
 .../nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch |   28 +++
 ...move-struct-file-argument-of-proc_handler.patch |   37 ++++
 ...5-headers-remove-sched.h-from-interrupt.h.patch |   23 +++
 ...sctl-net-Remove-unused-binary-sysctl-code.patch |  168 +++++++++++++++++++
 ...ysctl-Drop-in-front-of-every-proc_handler.patch |  174 ++++++++++++++++++++
 ...008-sunrpc-Clean-never-used-include-files.patch |   32 ++++
 ...entralise-most-calls-to-svc_xprt_received.patch |   61 +++++++
 ...010-sunrpc-Remove-uses-of-NIPQUAD-use-pI4.patch |   28 +++
 ...-sunrpc-Convert-void-snprintf-to-snprintf.patch |   38 +++++
 ...-the-test-for-XPRT_CONNECTING-into-xprt_c.patch |   49 ++++++
 ...-Fail-over-more-quickly-on-connect-errors.patch |   25 +++
 ...-the-task-tk_bytes_sent-and-tk_rtt-to-str.patch |   24 +++
 ...anup-Update-gfp.h-and-slab.h-includes-to-.patch |   66 ++++++++
 ...-sunrpc-xprtrdma-clean-up-workqueue-usage.patch |  135 +++++++++++++++
 ...017-sunrpc-Factor-out-rpc_xprt-allocation.patch |   38 +++++
 ...a-0018-sunrpc-Factor-out-rpc_xprt-freeing.patch |   33 ++++
 ...nfsrdma-0019-sunrpc-Tag-rpc_xprt-with-net.patch |   25 +++
 ...ull-net-argument-downto-svc_create_socket.patch |   33 ++++
 20 files changed, 1133 insertions(+), 0 deletions(-)
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0004-sysctl-remove-struct-file-argument-of-proc_handler.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0005-headers-remove-sched.h-from-interrupt.h.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0006-sysctl-net-Remove-unused-binary-sysctl-code.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0007-sysctl-Drop-in-front-of-every-proc_handler.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0008-sunrpc-Clean-never-used-include-files.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0009-sunrpc-centralise-most-calls-to-svc_xprt_received.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0010-sunrpc-Remove-uses-of-NIPQUAD-use-pI4.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0011-sunrpc-Convert-void-snprintf-to-snprintf.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0012-SUNRPC-Move-the-test-for-XPRT_CONNECTING-into-xprt_c.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0013-SUNRPC-Fail-over-more-quickly-on-connect-errors.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0014-SUNRPC-Move-the-task-tk_bytes_sent-and-tk_rtt-to-str.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0015-include-cleanup-Update-gfp.h-and-slab.h-includes-to-.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0016-sunrpc-xprtrdma-clean-up-workqueue-usage.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0017-sunrpc-Factor-out-rpc_xprt-allocation.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0018-sunrpc-Factor-out-rpc_xprt-freeing.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0019-sunrpc-Tag-rpc_xprt-with-net.patch
 create mode 100644 kernel_patches/backport/2.6.38/nfsrdma-0020-sunrpc-Pull-net-argument-downto-svc_create_socket.patch

diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch b/kernel_patches/backport/2.6.38/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch
new file mode 100644
index 0000000..de9c3a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0001-SUNRPC-Remove-duplicate-universal-address-generation.patch
@@ -0,0 +1,42 @@
+From ba809130bc260fce04141aca01ef9e068d32af2a Mon Sep 17 00:00:00 2001
+From: Chuck Lever <[email protected]>
+Date: Sun, 9 Aug 2009 15:09:35 -0400
+Subject: [PATCH] SUNRPC: Remove duplicate universal address generation
+
+RPC universal address generation is currently done in several places:
+rpcb_clnt.c, nfs4proc.c xprtsock.c, and xprtrdma.c.  Remove the
+redundant cases that convert a socket address to a universal
+address.  The nfs4proc.c case takes a pre-formatted presentation
+address string, not a socket address, so we'll leave that one.
+
+Because the new uaddr constructor uses the recently introduced
+rpc_ntop(), it now supports proper "::" shorthanding for IPv6
+addresses.  This allows the kernel to register properly formed
+universal addresses with the local rpcbind service, in _all_ cases.
+
+The kernel can now also send properly formed universal addresses in
+RPCB_GETADDR requests, and support link-local properly when
+encoding and decoding IPv6 addresses.
+
+Signed-off-by: Chuck Lever <[email protected]>
+Signed-off-by: Trond Myklebust <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 1dd6123..537c210 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -202,14 +202,6 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ 		snprintf(buf, 8, "%4hx", ntohs(addr->sin_port));
+ 	xprt->address_strings[RPC_DISPLAY_HEX_PORT] = buf;
+ 
+-	buf = kzalloc(30, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 30, "%pI4.%u.%u",
+-			&addr->sin_addr.s_addr,
+-			ntohs(addr->sin_port) >> 8,
+-			ntohs(addr->sin_port) & 0xff);
+-	xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;
+-
+ 	/* netid */
+ 	xprt->address_strings[RPC_DISPLAY_NETID] = "rdma";
+ }
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch b/kernel_patches/backport/2.6.38/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch
new file mode 100644
index 0000000..67d3f7b
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0002-SUNRPC-Use-rpc_ntop-for-constructing-transport-addre.patch
@@ -0,0 +1,74 @@
+From c877b849d302d1275452af80b7221a2555dc02e1 Mon Sep 17 00:00:00 2001
+From: Chuck Lever <[email protected]>
+Date: Sun, 9 Aug 2009 15:09:36 -0400
+Subject: [PATCH] SUNRPC: Use rpc_ntop() for constructing transport address strings
+
+Clean up:  In addition to using the new generic rpc_ntop() and
+rpc_get_port() functions, have the RPC client compute the presentation
+address buffer sizes dynamically using kstrdup().
+
+Signed-off-by: Chuck Lever <[email protected]>
+Signed-off-by: Trond Myklebust <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 537c210..5f9b867 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -168,39 +168,30 @@ static struct rpc_xprt_ops xprt_rdma_procs;	/* forward reference */
+ static void
+ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ {
+-	struct sockaddr_in *addr = (struct sockaddr_in *)
++	struct sockaddr *sap = (struct sockaddr *)
+ 					&rpcx_to_rdmad(xprt).addr;
+-	char *buf;
++	struct sockaddr_in *sin = (struct sockaddr_in *)sap;
++	char buf[64];
+ 
+-	buf = kzalloc(20, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 20, "%pI4", &addr->sin_addr.s_addr);
+-	xprt->address_strings[RPC_DISPLAY_ADDR] = buf;
++	(void)rpc_ntop(sap, buf, sizeof(buf));
++	xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL);
+ 
+-	buf = kzalloc(8, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 8, "%u", ntohs(addr->sin_port));
+-	xprt->address_strings[RPC_DISPLAY_PORT] = buf;
++	(void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
++	xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
+ 
+ 	xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
+ 
+-	buf = kzalloc(48, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 48, "addr=%pI4 port=%u proto=%s",
+-			&addr->sin_addr.s_addr,
+-			ntohs(addr->sin_port), "rdma");
+-	xprt->address_strings[RPC_DISPLAY_ALL] = buf;
+-
+-	buf = kzalloc(10, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 10, "%02x%02x%02x%02x",
+-			NIPQUAD(addr->sin_addr.s_addr));
+-	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = buf;
+-
+-	buf = kzalloc(8, GFP_KERNEL);
+-	if (buf)
+-		snprintf(buf, 8, "%4hx", ntohs(addr->sin_port));
+-	xprt->address_strings[RPC_DISPLAY_HEX_PORT] = buf;
++	(void)snprintf(buf, sizeof(buf), "addr=%s port=%s proto=rdma",
++			xprt->address_strings[RPC_DISPLAY_ADDR],
++			xprt->address_strings[RPC_DISPLAY_PORT]);
++	xprt->address_strings[RPC_DISPLAY_ALL] = kstrdup(buf, GFP_KERNEL);
++
++	(void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
++				NIPQUAD(sin->sin_addr.s_addr));
++	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
++
++	(void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
++	xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
+ 
+ 	/* netid */
+ 	xprt->address_strings[RPC_DISPLAY_NETID] = "rdma";
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch b/kernel_patches/backport/2.6.38/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch
new file mode 100644
index 0000000..7711a04
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0003-SUNRPC-Kill-RPC_DISPLAY_ALL.patch
@@ -0,0 +1,28 @@
+From c740eff84bcfd63c0497ef880e80171931cb8222 Mon Sep 17 00:00:00 2001
+From: Chuck Lever <[email protected]>
+Date: Sun, 9 Aug 2009 15:09:46 -0400
+Subject: [PATCH] SUNRPC: Kill RPC_DISPLAY_ALL
+
+At some point, I recall that rpc_pipe_fs used RPC_DISPLAY_ALL.
+Currently there are no uses of RPC_DISPLAY_ALL outside the transport
+modules themselves, so we can safely get rid of it.
+
+Signed-off-by: Chuck Lever <[email protected]>
+Signed-off-by: Trond Myklebust <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 5f9b867..9a63f66 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -181,11 +181,6 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ 
+ 	xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
+ 
+-	(void)snprintf(buf, sizeof(buf), "addr=%s port=%s proto=rdma",
+-			xprt->address_strings[RPC_DISPLAY_ADDR],
+-			xprt->address_strings[RPC_DISPLAY_PORT]);
+-	xprt->address_strings[RPC_DISPLAY_ALL] = kstrdup(buf, GFP_KERNEL);
+-
+ 	(void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
+ 				NIPQUAD(sin->sin_addr.s_addr));
+ 	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0004-sysctl-remove-struct-file-argument-of-proc_handler.patch b/kernel_patches/backport/2.6.38/nfsrdma-0004-sysctl-remove-struct-file-argument-of-proc_handler.patch
new file mode 100644
index 0000000..fa3793a
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0004-sysctl-remove-struct-file-argument-of-proc_handler.patch
@@ -0,0 +1,37 @@
+From 8d65af789f3e2cf4cfbdbf71a0f7a61ebcd41d38 Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <[email protected]>
+Date: Wed, 23 Sep 2009 15:57:19 -0700
+Subject: [PATCH] sysctl: remove "struct file *" argument of ->proc_handler
+
+It's unused.
+
+It isn't needed -- read or write flag is already passed and sysctl
+shouldn't care about the rest.
+
+It _was_ used in two places at arch/frv for some reason.
+
+Signed-off-by: Alexey Dobriyan <[email protected]>
+Cc: David Howells <[email protected]>
+Cc: "Eric W. Biederman" <[email protected]>
+Cc: Al Viro <[email protected]>
+Cc: Ralf Baechle <[email protected]>
+Cc: Martin Schwidefsky <[email protected]>
+Cc: Ingo Molnar <[email protected]>
+Cc: "David S. Miller" <[email protected]>
+Cc: James Morris <[email protected]>
+Signed-off-by: Andrew Morton <[email protected]>
+Signed-off-by: Linus Torvalds <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 8710117..35fb68b 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -80,7 +80,7 @@ struct kmem_cache *svc_rdma_ctxt_cachep;
+  * current value.
+  */
+ static int read_reset_stat(ctl_table *table, int write,
+-			   struct file *filp, void __user *buffer, size_t *lenp,
++			   void __user *buffer, size_t *lenp,
+ 			   loff_t *ppos)
+ {
+ 	atomic_t *stat = (atomic_t *)table->data;
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0005-headers-remove-sched.h-from-interrupt.h.patch b/kernel_patches/backport/2.6.38/nfsrdma-0005-headers-remove-sched.h-from-interrupt.h.patch
new file mode 100644
index 0000000..cb430ca
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0005-headers-remove-sched.h-from-interrupt.h.patch
@@ -0,0 +1,23 @@
+From d43c36dc6b357fa1806800f18aa30123c747a6d1 Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <[email protected]>
+Date: Wed, 7 Oct 2009 17:09:06 +0400
+Subject: [PATCH] headers: remove sched.h from interrupt.h
+
+After m68k's task_thread_info() doesn't refer to current,
+it's possible to remove sched.h from interrupt.h and not break m68k!
+Many thanks to Heiko Carstens for allowing this.
+
+Signed-off-by: Alexey Dobriyan <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index 0cf5e8c..3fa5751 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -42,6 +42,7 @@
+ #include <linux/sunrpc/svc_xprt.h>
+ #include <linux/sunrpc/debug.h>
+ #include <linux/sunrpc/rpc_rdma.h>
++#include <linux/sched.h>
+ #include <linux/spinlock.h>
+ #include <rdma/ib_verbs.h>
+ #include <rdma/rdma_cm.h>
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0006-sysctl-net-Remove-unused-binary-sysctl-code.patch b/kernel_patches/backport/2.6.38/nfsrdma-0006-sysctl-net-Remove-unused-binary-sysctl-code.patch
new file mode 100644
index 0000000..ccee16c
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0006-sysctl-net-Remove-unused-binary-sysctl-code.patch
@@ -0,0 +1,168 @@
+From f8572d8f2a2ba75408b97dc24ef47c83671795d7 Mon Sep 17 00:00:00 2001
+From: Eric W. Biederman <[email protected]>
+Date: Thu, 5 Nov 2009 13:32:03 -0800
+Subject: [PATCH] sysctl net: Remove unused binary sysctl code
+
+Now that sys_sysctl is a compatiblity wrapper around /proc/sys
+all sysctl strategy routines, and all ctl_name and strategy
+entries in the sysctl tables are unused, and can be
+revmoed.
+
+In addition neigh_sysctl_register has been modified to no longer
+take a strategy argument and it's callers have been modified not
+to pass one.
+
+Cc: "David Miller" <[email protected]>
+Cc: Hideaki YOSHIFUJI <[email protected]>
+Cc: [email protected]
+Signed-off-by: Eric W. Biederman <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 35fb68b..678cee2 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -121,7 +121,6 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_max_requests,
+ 		.extra2		= &max_max_requests
+ 	},
+@@ -131,7 +130,6 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_max_inline,
+ 		.extra2		= &max_max_inline
+ 	},
+@@ -141,7 +139,6 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_ord,
+ 		.extra2		= &max_ord,
+ 	},
+@@ -209,9 +206,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.mode		= 0644,
+ 		.proc_handler	= &read_reset_stat,
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ static ctl_table svcrdma_table[] = {
+@@ -220,21 +215,16 @@ static ctl_table svcrdma_table[] = {
+ 		.mode		= 0555,
+ 		.child		= svcrdma_parm_table
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ static ctl_table svcrdma_root_table[] = {
+ 	{
+-		.ctl_name	= CTL_SUNRPC,
+ 		.procname	= "sunrpc",
+ 		.mode		= 0555,
+ 		.child		= svcrdma_table
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ void svc_rdma_cleanup(void)
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 9a63f66..4768160 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -86,79 +86,63 @@ static struct ctl_table_header *sunrpc_table_header;
+ 
+ static ctl_table xr_tunables_table[] = {
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_slot_table_entries",
+ 		.data		= &xprt_rdma_slot_table_entries,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_slot_table_size,
+ 		.extra2		= &max_slot_table_size
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_max_inline_read",
+ 		.data		= &xprt_rdma_max_inline_read,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec,
+-		.strategy	= &sysctl_intvec,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_max_inline_write",
+ 		.data		= &xprt_rdma_max_inline_write,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec,
+-		.strategy	= &sysctl_intvec,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_inline_write_padding",
+ 		.data		= &xprt_rdma_inline_write_padding,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &zero,
+ 		.extra2		= &max_padding,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_memreg_strategy",
+ 		.data		= &xprt_rdma_memreg_strategy,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec_minmax,
+-		.strategy	= &sysctl_intvec,
+ 		.extra1		= &min_memreg,
+ 		.extra2		= &max_memreg,
+ 	},
+ 	{
+-		.ctl_name       = CTL_UNNUMBERED,
+ 		.procname	= "rdma_pad_optimize",
+ 		.data		= &xprt_rdma_pad_optimize,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+ 		.proc_handler	= &proc_dointvec,
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ static ctl_table sunrpc_table[] = {
+ 	{
+-		.ctl_name	= CTL_SUNRPC,
+ 		.procname	= "sunrpc",
+ 		.mode		= 0555,
+ 		.child		= xr_tunables_table
+ 	},
+-	{
+-		.ctl_name = 0,
+-	},
++	{ },
+ };
+ 
+ #endif
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0007-sysctl-Drop-in-front-of-every-proc_handler.patch b/kernel_patches/backport/2.6.38/nfsrdma-0007-sysctl-Drop-in-front-of-every-proc_handler.patch
new file mode 100644
index 0000000..3bb4587
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0007-sysctl-Drop-in-front-of-every-proc_handler.patch
@@ -0,0 +1,174 @@
+From 6d4561110a3e9fa742aeec6717248a491dfb1878 Mon Sep 17 00:00:00 2001
+From: Eric W. Biederman <[email protected]>
+Date: Mon, 16 Nov 2009 03:11:48 -0800
+Subject: [PATCH] sysctl: Drop & in front of every proc_handler.
+
+For consistency drop & in front of every proc_handler.  Explicity
+taking the address is unnecessary and it prevents optimizations
+like stubbing the proc_handlers to NULL.
+
+Cc: Alexey Dobriyan <[email protected]>
+Cc: Ingo Molnar <[email protected]>
+Cc: Joe Perches <[email protected]>
+Signed-off-by: Eric W. Biederman <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 678cee2..5b8a8ff 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -120,7 +120,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &svcrdma_max_requests,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_max_requests,
+ 		.extra2		= &max_max_requests
+ 	},
+@@ -129,7 +129,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &svcrdma_max_req_size,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_max_inline,
+ 		.extra2		= &max_max_inline
+ 	},
+@@ -138,7 +138,7 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &svcrdma_ord,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_ord,
+ 		.extra2		= &max_ord,
+ 	},
+@@ -148,63 +148,63 @@ static ctl_table svcrdma_parm_table[] = {
+ 		.data		= &rdma_stat_read,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_recv",
+ 		.data		= &rdma_stat_recv,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_write",
+ 		.data		= &rdma_stat_write,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_sq_starve",
+ 		.data		= &rdma_stat_sq_starve,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_rq_starve",
+ 		.data		= &rdma_stat_rq_starve,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_rq_poll",
+ 		.data		= &rdma_stat_rq_poll,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_rq_prod",
+ 		.data		= &rdma_stat_rq_prod,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_sq_poll",
+ 		.data		= &rdma_stat_sq_poll,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{
+ 		.procname	= "rdma_stat_sq_prod",
+ 		.data		= &rdma_stat_sq_prod,
+ 		.maxlen		= sizeof(atomic_t),
+ 		.mode		= 0644,
+-		.proc_handler	= &read_reset_stat,
++		.proc_handler	= read_reset_stat,
+ 	},
+ 	{ },
+ };
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 4768160..7018eef 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -90,7 +90,7 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_slot_table_entries,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_slot_table_size,
+ 		.extra2		= &max_slot_table_size
+ 	},
+@@ -99,21 +99,21 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_max_inline_read,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec,
++		.proc_handler	= proc_dointvec,
+ 	},
+ 	{
+ 		.procname	= "rdma_max_inline_write",
+ 		.data		= &xprt_rdma_max_inline_write,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec,
++		.proc_handler	= proc_dointvec,
+ 	},
+ 	{
+ 		.procname	= "rdma_inline_write_padding",
+ 		.data		= &xprt_rdma_inline_write_padding,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &zero,
+ 		.extra2		= &max_padding,
+ 	},
+@@ -122,7 +122,7 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_memreg_strategy,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec_minmax,
++		.proc_handler	= proc_dointvec_minmax,
+ 		.extra1		= &min_memreg,
+ 		.extra2		= &max_memreg,
+ 	},
+@@ -131,7 +131,7 @@ static ctl_table xr_tunables_table[] = {
+ 		.data		= &xprt_rdma_pad_optimize,
+ 		.maxlen		= sizeof(unsigned int),
+ 		.mode		= 0644,
+-		.proc_handler	= &proc_dointvec,
++		.proc_handler	= proc_dointvec,
+ 	},
+ 	{ },
+ };
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0008-sunrpc-Clean-never-used-include-files.patch b/kernel_patches/backport/2.6.38/nfsrdma-0008-sunrpc-Clean-never-used-include-files.patch
new file mode 100644
index 0000000..8787238
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0008-sunrpc-Clean-never-used-include-files.patch
@@ -0,0 +1,32 @@
+From a600ffcbb3743cf1296bee2a41d4824c719d7181 Mon Sep 17 00:00:00 2001
+From: Boaz Harrosh <[email protected]>
+Date: Thu, 3 Dec 2009 20:28:35 +0200
+Subject: [PATCH] sunrpc: Clean never used include files
+
+Remove include of two headers never used by this file.
+Doing so exposed a missing #include <linux/types.h> in
+include/linux/sunrpc/rpc_rdma.h.
+
+I did not see any other users dependency but if exist they
+should be fixed since these headers are totally irrelevant
+to here.
+
+Signed-off-by: Boaz Harrosh <[email protected]>
+Signed-off-by: J. Bruce Fields <[email protected]>
+---
+diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h
+index 87b895d..b78f16b 100644
+--- a/include/linux/sunrpc/rpc_rdma.h
++++ b/include/linux/sunrpc/rpc_rdma.h
+@@ -40,6 +40,8 @@
+ #ifndef _LINUX_SUNRPC_RPC_RDMA_H
+ #define _LINUX_SUNRPC_RPC_RDMA_H
+ 
++#include <linux/types.h>
++
+ struct rpcrdma_segment {
+ 	__be32 rs_handle;	/* Registered memory handle */
+ 	__be32 rs_length;	/* Length of the chunk in bytes */
+-- 
+1.7.3.4
+
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0009-sunrpc-centralise-most-calls-to-svc_xprt_received.patch b/kernel_patches/backport/2.6.38/nfsrdma-0009-sunrpc-centralise-most-calls-to-svc_xprt_received.patch
new file mode 100644
index 0000000..dea25f7
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0009-sunrpc-centralise-most-calls-to-svc_xprt_received.patch
@@ -0,0 +1,61 @@
+From b48fa6b99100dc7772af3cd276035fcec9719ceb Mon Sep 17 00:00:00 2001
+From: Neil Brown <[email protected]>
+Date: Mon, 1 Mar 2010 16:51:14 +1100
+Subject: [PATCH] sunrpc: centralise most calls to svc_xprt_received
+
+svc_xprt_received must be called when ->xpo_recvfrom has finished
+receiving a message, so that the XPT_BUSY flag will be cleared and
+if necessary, requeued for further work.
+
+This call is currently made in each ->xpo_recvfrom function, often
+from multiple different points.  In each case it is the earliest point
+on a particular path where it is known that the protection provided by
+XPT_BUSY is no longer needed.
+
+However there are (still) some error paths which do not call
+svc_xprt_received, and requiring each ->xpo_recvfrom to make the call
+does not encourage robustness.
+
+So: move the svc_xprt_received call to be made just after the
+call to ->xpo_recvfrom(), and move it of the various ->xpo_recvfrom
+methods.
+
+This means that it may not be called at the earliest possible instant,
+but this is unlikely to be a measurable performance issue.
+
+Note that there are still other calls to svc_xprt_received as it is
+also needed when an xprt is newly created.
+
+Signed-off-by: NeilBrown <[email protected]>
+Signed-off-by: J. Bruce Fields <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+index f92e37e..0194de8 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+@@ -566,7 +566,6 @@ static int rdma_read_complete(struct svc_rqst *rqstp,
+ 		ret, rqstp->rq_arg.len,	rqstp->rq_arg.head[0].iov_base,
+ 		rqstp->rq_arg.head[0].iov_len);
+ 
+-	svc_xprt_received(rqstp->rq_xprt);
+ 	return ret;
+ }
+ 
+@@ -665,7 +664,6 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
+ 		rqstp->rq_arg.head[0].iov_len);
+ 	rqstp->rq_prot = IPPROTO_MAX;
+ 	svc_xprt_copy_addrs(rqstp, xprt);
+-	svc_xprt_received(xprt);
+ 	return ret;
+ 
+  close_out:
+@@ -678,6 +676,5 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
+ 	 */
+ 	set_bit(XPT_CLOSE, &xprt->xpt_flags);
+ defer:
+-	svc_xprt_received(xprt);
+ 	return 0;
+ }
+-- 
+1.7.3.4
+
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0010-sunrpc-Remove-uses-of-NIPQUAD-use-pI4.patch b/kernel_patches/backport/2.6.38/nfsrdma-0010-sunrpc-Remove-uses-of-NIPQUAD-use-pI4.patch
new file mode 100644
index 0000000..fdd46ea
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0010-sunrpc-Remove-uses-of-NIPQUAD-use-pI4.patch
@@ -0,0 +1,28 @@
+From fc0b579168cbe737c83c6b9bbfe265d3ae6baca6 Mon Sep 17 00:00:00 2001
+From: Joe Perches <[email protected]>
+Date: Mon, 8 Mar 2010 12:15:28 -0800
+Subject: [PATCH 2/2] net/sunrpc: Remove uses of NIPQUAD, use %pI4
+
+Originally submitted Jan 1, 2010
+http://patchwork.kernel.org/patch/71221/
+
+Convert NIPQUAD to the %pI4 format extension where possible
+Convert %02x%02x%02x%02x/NIPQUAD to %08x/ntohl
+
+Signed-off-by: Joe Perches <[email protected]>
+Signed-off-by: David S. Miller <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 7018eef..83d339f 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -165,8 +165,7 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ 
+ 	xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
+ 
+-	(void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
+-				NIPQUAD(sin->sin_addr.s_addr));
++	(void)snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr));
+ 	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
+ 
+ 	(void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0011-sunrpc-Convert-void-snprintf-to-snprintf.patch b/kernel_patches/backport/2.6.38/nfsrdma-0011-sunrpc-Convert-void-snprintf-to-snprintf.patch
new file mode 100644
index 0000000..6aec603
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0011-sunrpc-Convert-void-snprintf-to-snprintf.patch
@@ -0,0 +1,38 @@
+From 81160e66cca3d3a16b7d88e0e2dccfc5c76f36f9 Mon Sep 17 00:00:00 2001
+From: Joe Perches <[email protected]>
+Date: Mon, 8 Mar 2010 12:15:59 -0800
+Subject: [PATCH] net/sunrpc: Convert (void)snprintf to snprintf
+
+(Applies on top of "Remove uses of NIPQUAD, use %pI4")
+
+Casts to void of snprintf are most uncommon in kernel source.
+9 use casts, 1301 do not.
+
+Remove the remaining uses in net/sunrpc/
+
+Signed-off-by: Joe Perches <[email protected]>
+Signed-off-by: David S. Miller <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 83d339f..f96c2fe 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -160,15 +160,15 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
+ 	(void)rpc_ntop(sap, buf, sizeof(buf));
+ 	xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL);
+ 
+-	(void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
++	snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
+ 	xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
+ 
+ 	xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
+ 
+-	(void)snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr));
++	snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr));
+ 	xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
+ 
+-	(void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
++	snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
+ 	xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
+ 
+ 	/* netid */
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0012-SUNRPC-Move-the-test-for-XPRT_CONNECTING-into-xprt_c.patch b/kernel_patches/backport/2.6.38/nfsrdma-0012-SUNRPC-Move-the-test-for-XPRT_CONNECTING-into-xprt_c.patch
new file mode 100644
index 0000000..5a1d1ea
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0012-SUNRPC-Move-the-test-for-XPRT_CONNECTING-into-xprt_c.patch
@@ -0,0 +1,49 @@
+From 0b9e79431377df452348e78262dd5a3dc359eeef Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <[email protected]>
+Date: Fri, 16 Apr 2010 16:41:57 -0400
+Subject: [PATCH] SUNRPC: Move the test for XPRT_CONNECTING into xprt_connect()
+
+This fixes a bug with setting xprt->stat.connect_start.
+
+Reviewed-by: Chuck Lever <[email protected]>
+Signed-off-by: Trond Myklebust <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 187257b..0607b9a 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -449,21 +449,19 @@ xprt_rdma_connect(struct rpc_task *task)
+ 	struct rpc_xprt *xprt = (struct rpc_xprt *)task->tk_xprt;
+ 	struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
+ 
+-	if (!xprt_test_and_set_connecting(xprt)) {
+-		if (r_xprt->rx_ep.rep_connected != 0) {
+-			/* Reconnect */
+-			schedule_delayed_work(&r_xprt->rdma_connect,
+-				xprt->reestablish_timeout);
+-			xprt->reestablish_timeout <<= 1;
+-			if (xprt->reestablish_timeout > (30 * HZ))
+-				xprt->reestablish_timeout = (30 * HZ);
+-			else if (xprt->reestablish_timeout < (5 * HZ))
+-				xprt->reestablish_timeout = (5 * HZ);
+-		} else {
+-			schedule_delayed_work(&r_xprt->rdma_connect, 0);
+-			if (!RPC_IS_ASYNC(task))
+-				flush_scheduled_work();
+-		}
++	if (r_xprt->rx_ep.rep_connected != 0) {
++		/* Reconnect */
++		schedule_delayed_work(&r_xprt->rdma_connect,
++			xprt->reestablish_timeout);
++		xprt->reestablish_timeout <<= 1;
++		if (xprt->reestablish_timeout > (30 * HZ))
++			xprt->reestablish_timeout = (30 * HZ);
++		else if (xprt->reestablish_timeout < (5 * HZ))
++			xprt->reestablish_timeout = (5 * HZ);
++	} else {
++		schedule_delayed_work(&r_xprt->rdma_connect, 0);
++		if (!RPC_IS_ASYNC(task))
++			flush_scheduled_work();
+ 	}
+ }
+ 
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0013-SUNRPC-Fail-over-more-quickly-on-connect-errors.patch b/kernel_patches/backport/2.6.38/nfsrdma-0013-SUNRPC-Fail-over-more-quickly-on-connect-errors.patch
new file mode 100644
index 0000000..4b0b2fc
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0013-SUNRPC-Fail-over-more-quickly-on-connect-errors.patch
@@ -0,0 +1,25 @@
+From a8ce4a8f37fef0a09a1e920c2e09f67a80426c7e Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <[email protected]>
+Date: Fri, 16 Apr 2010 16:42:12 -0400
+Subject: [PATCH] SUNRPC: Fail over more quickly on connect errors
+
+We should not allow soft tasks to wait for longer than the major timeout
+period when waiting for a reconnect to occur.
+
+Remove the field xprt->connect_timeout since it has been obsoleted by
+xprt->reestablish_timeout.
+
+Signed-off-by: Trond Myklebust <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 0607b9a..3f3b38c 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -305,7 +305,6 @@ xprt_setup_rdma(struct xprt_create *args)
+ 	/* 60 second timeout, no retries */
+ 	xprt->timeout = &xprt_rdma_default_timeout;
+ 	xprt->bind_timeout = (60U * HZ);
+-	xprt->connect_timeout = (60U * HZ);
+ 	xprt->reestablish_timeout = (5U * HZ);
+ 	xprt->idle_timeout = (5U * 60 * HZ);
+ 
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0014-SUNRPC-Move-the-task-tk_bytes_sent-and-tk_rtt-to-str.patch b/kernel_patches/backport/2.6.38/nfsrdma-0014-SUNRPC-Move-the-task-tk_bytes_sent-and-tk_rtt-to-str.patch
new file mode 100644
index 0000000..148aba1
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0014-SUNRPC-Move-the-task-tk_bytes_sent-and-tk_rtt-to-str.patch
@@ -0,0 +1,24 @@
+From d60dbb20a74c2cfa142be0a34dac3c6547ea086c Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <[email protected]>
+Date: Thu, 13 May 2010 12:51:49 -0400
+Subject: [PATCH] SUNRPC: Move the task->tk_bytes_sent and tk_rtt to struct rpc_rqst
+
+It seems strange to maintain stats for bytes_sent in one structure, and
+bytes received in another. Try to assemble all the RPC request-related
+stats in struct rpc_rqst
+
+Signed-off-by: Trond Myklebust <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 3f3b38c..a85e866 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -674,7 +674,7 @@ xprt_rdma_send_request(struct rpc_task *task)
+ 	if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req))
+ 		goto drop_connection;
+ 
+-	task->tk_bytes_sent += rqst->rq_snd_buf.len;
++	rqst->rq_xmit_bytes_sent += rqst->rq_snd_buf.len;
+ 	rqst->rq_bytes_sent = 0;
+ 	return 0;
+ 
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0015-include-cleanup-Update-gfp.h-and-slab.h-includes-to-.patch b/kernel_patches/backport/2.6.38/nfsrdma-0015-include-cleanup-Update-gfp.h-and-slab.h-includes-to-.patch
new file mode 100644
index 0000000..a85c44b
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0015-include-cleanup-Update-gfp.h-and-slab.h-includes-to-.patch
@@ -0,0 +1,66 @@
+From 5a0e3ad6af8660be21ca98a971cd00f331318c05 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <[email protected]>
+Date: Wed, 24 Mar 2010 17:04:11 +0900
+Subject: [PATCH] include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
+
+percpu.h is included by sched.h and module.h and thus ends up being
+included when building most .c files.  percpu.h includes slab.h which
+in turn includes gfp.h making everything defined by the two files
+universally available and complicating inclusion dependencies.
+
+percpu.h -> slab.h dependency is about to be removed.  Prepare for
+this change by updating users of gfp and slab facilities include those
+headers directly instead of assuming availability.  As this conversion
+needs to touch large number of source files, the following script is
+used as the basis of conversion.
+
+  http://userweb.kernel.org/~tj/misc/slabh-sweep.py
+
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index 5b8a8ff..d718b8f 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -40,6 +40,7 @@
+  */
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/slab.h>
+ #include <linux/fs.h>
+ #include <linux/sysctl.h>
+ #include <linux/sunrpc/clnt.h>
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index 3fa5751..fd90eb8 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -43,6 +43,7 @@
+ #include <linux/sunrpc/debug.h>
+ #include <linux/sunrpc/rpc_rdma.h>
+ #include <linux/sched.h>
++#include <linux/slab.h>
+ #include <linux/spinlock.h>
+ #include <rdma/ib_verbs.h>
+ #include <rdma/rdma_cm.h>
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index f96c2fe..187257b 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -49,6 +49,7 @@
+ 
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/slab.h>
+ #include <linux/seq_file.h>
+ 
+ #include "xprt_rdma.h"
+diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
+index 2209aa8..27015c6 100644
+--- a/net/sunrpc/xprtrdma/verbs.c
++++ b/net/sunrpc/xprtrdma/verbs.c
+@@ -48,6 +48,7 @@
+  */
+ 
+ #include <linux/pci.h>	/* for Tavor hack below */
++#include <linux/slab.h>
+ 
+ #include "xprt_rdma.h"
+ 
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0016-sunrpc-xprtrdma-clean-up-workqueue-usage.patch b/kernel_patches/backport/2.6.38/nfsrdma-0016-sunrpc-xprtrdma-clean-up-workqueue-usage.patch
new file mode 100644
index 0000000..40eac25
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0016-sunrpc-xprtrdma-clean-up-workqueue-usage.patch
@@ -0,0 +1,135 @@
+From a25e758c5fa1137e1bbc440194e55f7c59177145 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <[email protected]>
+Date: Fri, 15 Oct 2010 17:49:27 +0200
+Subject: [PATCH] sunrpc/xprtrdma: clean up workqueue usage
+
+* Create and use svc_rdma_wq instead of using the system workqueue and
+  flush_scheduled_work().  This workqueue is necessary to serve as
+  flushing domain for rdma->sc_work which is used to destroy itself
+  and thus can't be flushed explicitly.
+
+* Replace cancel_delayed_work() + flush_scheduled_work() with
+  cancel_delayed_work_sync().
+
+* Implement synchronous connect in xprt_rdma_connect() using
+  flush_delayed_work() on the rdma_connect work instead of using
+  flush_scheduled_work().
+
+This is to prepare for the deprecation and removal of
+flush_scheduled_work().
+
+Signed-off-by: Tejun Heo <[email protected]>
+Signed-off-by: J. Bruce Fields <[email protected]>
+---
+ net/sunrpc/xprtrdma/svc_rdma.c           |   11 ++++++++++-
+ net/sunrpc/xprtrdma/svc_rdma_transport.c |    6 +++++-
+ net/sunrpc/xprtrdma/transport.c          |    5 ++---
+ 3 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
+index d718b8f..09af4fa 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma.c
++++ b/net/sunrpc/xprtrdma/svc_rdma.c
+@@ -43,6 +43,7 @@
+ #include <linux/slab.h>
+ #include <linux/fs.h>
+ #include <linux/sysctl.h>
++#include <linux/workqueue.h>
+ #include <linux/sunrpc/clnt.h>
+ #include <linux/sunrpc/sched.h>
+ #include <linux/sunrpc/svc_rdma.h>
+@@ -74,6 +75,8 @@ atomic_t rdma_stat_sq_prod;
+ struct kmem_cache *svc_rdma_map_cachep;
+ struct kmem_cache *svc_rdma_ctxt_cachep;
+ 
++struct workqueue_struct *svc_rdma_wq;
++
+ /*
+  * This function implements reading and resetting an atomic_t stat
+  * variable through read/write to a proc file. Any write to the file
+@@ -231,7 +234,7 @@ static ctl_table svcrdma_root_table[] = {
+ void svc_rdma_cleanup(void)
+ {
+ 	dprintk("SVCRDMA Module Removed, deregister RPC RDMA transport\n");
+-	flush_scheduled_work();
++	destroy_workqueue(svc_rdma_wq);
+ 	if (svcrdma_table_header) {
+ 		unregister_sysctl_table(svcrdma_table_header);
+ 		svcrdma_table_header = NULL;
+@@ -249,6 +252,11 @@ int svc_rdma_init(void)
+ 	dprintk("\tsq_depth         : %d\n",
+ 		svcrdma_max_requests * RPCRDMA_SQ_DEPTH_MULT);
+ 	dprintk("\tmax_inline       : %d\n", svcrdma_max_req_size);
++
++	svc_rdma_wq = alloc_workqueue("svc_rdma", 0, 0);
++	if (!svc_rdma_wq)
++		return -ENOMEM;
++
+ 	if (!svcrdma_table_header)
+ 		svcrdma_table_header =
+ 			register_sysctl_table(svcrdma_root_table);
+@@ -283,6 +291,7 @@ int svc_rdma_init(void)
+ 	kmem_cache_destroy(svc_rdma_map_cachep);
+  err0:
+ 	unregister_sysctl_table(svcrdma_table_header);
++	destroy_workqueue(svc_rdma_wq);
+ 	return -ENOMEM;
+ }
+ MODULE_AUTHOR("Tom Tucker <[email protected]>");
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index 22f65cc..9df1ead 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -45,6 +45,7 @@
+ #include <linux/sched.h>
+ #include <linux/slab.h>
+ #include <linux/spinlock.h>
++#include <linux/workqueue.h>
+ #include <rdma/ib_verbs.h>
+ #include <rdma/rdma_cm.h>
+ #include <linux/sunrpc/svc_rdma.h>
+@@ -90,6 +91,9 @@ struct svc_xprt_class svc_rdma_class = {
+ /* WR context cache. Created in svc_rdma.c  */
+ extern struct kmem_cache *svc_rdma_ctxt_cachep;
+ 
++/* Workqueue created in svc_rdma.c */
++extern struct workqueue_struct *svc_rdma_wq;
++
+ struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *xprt)
+ {
+ 	struct svc_rdma_op_ctxt *ctxt;
+@@ -1187,7 +1191,7 @@ static void svc_rdma_free(struct svc_xprt *xprt)
+ 	struct svcxprt_rdma *rdma =
+ 		container_of(xprt, struct svcxprt_rdma, sc_xprt);
+ 	INIT_WORK(&rdma->sc_work, __svc_rdma_free);
+-	schedule_work(&rdma->sc_work);
++	queue_work(svc_rdma_wq, &rdma->sc_work);
+ }
+ 
+ static int svc_rdma_has_wspace(struct svc_xprt *xprt)
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 2da32b4..0867070 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -237,8 +237,7 @@ xprt_rdma_destroy(struct rpc_xprt *xprt)
+ 
+ 	dprintk("RPC:       %s: called\n", __func__);
+ 
+-	cancel_delayed_work(&r_xprt->rdma_connect);
+-	flush_scheduled_work();
++	cancel_delayed_work_sync(&r_xprt->rdma_connect);
+ 
+ 	xprt_clear_connected(xprt);
+ 
+@@ -448,7 +447,7 @@ xprt_rdma_connect(struct rpc_task *task)
+ 	} else {
+ 		schedule_delayed_work(&r_xprt->rdma_connect, 0);
+ 		if (!RPC_IS_ASYNC(task))
+-			flush_scheduled_work();
++			flush_delayed_work(&r_xprt->rdma_connect);
+ 	}
+ }
+ 
+-- 
+1.7.3.4
+
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0017-sunrpc-Factor-out-rpc_xprt-allocation.patch b/kernel_patches/backport/2.6.38/nfsrdma-0017-sunrpc-Factor-out-rpc_xprt-allocation.patch
new file mode 100644
index 0000000..b21a33c
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0017-sunrpc-Factor-out-rpc_xprt-allocation.patch
@@ -0,0 +1,38 @@
+From bd1722d4316e42a12fe6337ebe34d7e1e2c088b2 Mon Sep 17 00:00:00 2001
+From: Pavel Emelyanov <[email protected]>
+Date: Wed, 29 Sep 2010 16:02:43 +0400
+Subject: [PATCH] sunrpc: Factor out rpc_xprt allocation
+
+Signed-off-by: Pavel Emelyanov <[email protected]>
+Signed-off-by: J. Bruce Fields <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index a85e866..9d77bf2 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -285,23 +285,14 @@ xprt_setup_rdma(struct xprt_create *args)
+ 		return ERR_PTR(-EBADF);
+ 	}
+ 
+-	xprt = kzalloc(sizeof(struct rpcrdma_xprt), GFP_KERNEL);
++	xprt = xprt_alloc(sizeof(struct rpcrdma_xprt),
++			xprt_rdma_slot_table_entries);
+ 	if (xprt == NULL) {
+ 		dprintk("RPC:       %s: couldn't allocate rpcrdma_xprt\n",
+ 			__func__);
+ 		return ERR_PTR(-ENOMEM);
+ 	}
+ 
+-	xprt->max_reqs = xprt_rdma_slot_table_entries;
+-	xprt->slot = kcalloc(xprt->max_reqs,
+-				sizeof(struct rpc_rqst), GFP_KERNEL);
+-	if (xprt->slot == NULL) {
+-		dprintk("RPC:       %s: couldn't allocate %d slots\n",
+-			__func__, xprt->max_reqs);
+-		kfree(xprt);
+-		return ERR_PTR(-ENOMEM);
+-	}
+-
+ 	/* 60 second timeout, no retries */
+ 	xprt->timeout = &xprt_rdma_default_timeout;
+ 	xprt->bind_timeout = (60U * HZ);
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0018-sunrpc-Factor-out-rpc_xprt-freeing.patch b/kernel_patches/backport/2.6.38/nfsrdma-0018-sunrpc-Factor-out-rpc_xprt-freeing.patch
new file mode 100644
index 0000000..af4eb54
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0018-sunrpc-Factor-out-rpc_xprt-freeing.patch
@@ -0,0 +1,33 @@
+From e204e621b4160c802315bc2d0fa335337c0d62e8 Mon Sep 17 00:00:00 2001
+From: Pavel Emelyanov <[email protected]>
+Date: Wed, 29 Sep 2010 16:03:13 +0400
+Subject: [PATCH] sunrpc: Factor out rpc_xprt freeing
+
+Signed-off-by: Pavel Emelyanov <[email protected]>
+Signed-off-by: J. Bruce Fields <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 9d77bf2..0f7a1b9 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -251,9 +251,7 @@ xprt_rdma_destroy(struct rpc_xprt *xprt)
+ 
+ 	xprt_rdma_free_addresses(xprt);
+ 
+-	kfree(xprt->slot);
+-	xprt->slot = NULL;
+-	kfree(xprt);
++	xprt_free(xprt);
+ 
+ 	dprintk("RPC:       %s: returning\n", __func__);
+ 
+@@ -401,8 +399,7 @@ out3:
+ out2:
+ 	rpcrdma_ia_close(&new_xprt->rx_ia);
+ out1:
+-	kfree(xprt->slot);
+-	kfree(xprt);
++	xprt_free(xprt);
+ 	return ERR_PTR(rc);
+ }
+ 
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0019-sunrpc-Tag-rpc_xprt-with-net.patch b/kernel_patches/backport/2.6.38/nfsrdma-0019-sunrpc-Tag-rpc_xprt-with-net.patch
new file mode 100644
index 0000000..6b43edc
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0019-sunrpc-Tag-rpc_xprt-with-net.patch
@@ -0,0 +1,25 @@
+From 37aa2133731d9231eb834f700119f0d3f1ed2664 Mon Sep 17 00:00:00 2001
+From: Pavel Emelyanov <[email protected]>
+Date: Wed, 29 Sep 2010 16:05:43 +0400
+Subject: [PATCH] sunrpc: Tag rpc_xprt with net
+
+The net is known from the xprt_create and this tagging will also
+give un the context in the conntection workers where real sockets
+are created.
+
+Signed-off-by: Pavel Emelyanov <[email protected]>
+Signed-off-by: J. Bruce Fields <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
+index 0f7a1b9..2da32b4 100644
+--- a/net/sunrpc/xprtrdma/transport.c
++++ b/net/sunrpc/xprtrdma/transport.c
+@@ -283,7 +283,7 @@ xprt_setup_rdma(struct xprt_create *args)
+ 		return ERR_PTR(-EBADF);
+ 	}
+ 
+-	xprt = xprt_alloc(sizeof(struct rpcrdma_xprt),
++	xprt = xprt_alloc(args->net, sizeof(struct rpcrdma_xprt),
+ 			xprt_rdma_slot_table_entries);
+ 	if (xprt == NULL) {
+ 		dprintk("RPC:       %s: couldn't allocate rpcrdma_xprt\n",
diff --git a/kernel_patches/backport/2.6.38/nfsrdma-0020-sunrpc-Pull-net-argument-downto-svc_create_socket.patch b/kernel_patches/backport/2.6.38/nfsrdma-0020-sunrpc-Pull-net-argument-downto-svc_create_socket.patch
new file mode 100644
index 0000000..4ca1e81
--- /dev/null
+++ b/kernel_patches/backport/2.6.38/nfsrdma-0020-sunrpc-Pull-net-argument-downto-svc_create_socket.patch
@@ -0,0 +1,33 @@
+From 62832c039eab9d03cd28a66427ce8276988f28b0 Mon Sep 17 00:00:00 2001
+From: Pavel Emelyanov <[email protected]>
+Date: Wed, 29 Sep 2010 16:04:18 +0400
+Subject: [PATCH] sunrpc: Pull net argument downto svc_create_socket
+
+After this the socket creation in it knows the context.
+
+Signed-off-by: Pavel Emelyanov <[email protected]>
+Signed-off-by: J. Bruce Fields <[email protected]>
+---
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+index edea15a..950a206 100644
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
+@@ -52,6 +52,7 @@
+ #define RPCDBG_FACILITY	RPCDBG_SVCXPRT
+ 
+ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
++					struct net *net,
+ 					struct sockaddr *sa, int salen,
+ 					int flags);
+ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt);
+@@ -670,6 +671,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id,
+  * Create a listening RDMA service endpoint.
+  */
+ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
++					struct net *net,
+ 					struct sockaddr *sa, int salen,
+ 					int flags)
+ {
+-- 
+1.7.3.4
+
-- 
1.7.3.4

_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to