[kernel] r16530 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Thu Nov 4 16:16:57 UTC 2010
Author: benh
Date: Thu Nov 4 16:16:23 2010
New Revision: 16530
Log:
sunrpc: Fix NFS client over TCP hangs due to packet loss (Closes: #589945)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/sunrpc-fix-NFS-client-over-TCP-hangs-due-to-packet-loss.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/28
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Tue Nov 2 23:59:54 2010 (r16529)
+++ dists/sid/linux-2.6/debian/changelog Thu Nov 4 16:16:23 2010 (r16530)
@@ -26,6 +26,7 @@
[ Ben Hutchings ]
* Update Japanese debconf template translation (Nobuhiro Iwamatsu)
(Closes: #602152)
+ * sunrpc: Fix NFS client over TCP hangs due to packet loss (Closes: #589945)
-- maximilian attems <maks at debian.org> Sat, 30 Oct 2010 14:14:37 +0200
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/sunrpc-fix-NFS-client-over-TCP-hangs-due-to-packet-loss.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/sunrpc-fix-NFS-client-over-TCP-hangs-due-to-packet-loss.patch Thu Nov 4 16:16:23 2010 (r16530)
@@ -0,0 +1,67 @@
+From: Andy Chittenden <andyc.bluearc at gmail.com>
+Date: Tue, 10 Aug 2010 10:19:53 -0400
+Subject: [PATCH] SUNRPC: fix NFS client over TCP hangs due to packet loss (Bug 16494)
+
+commit 669502ff31d7dba1849aec7ee2450a3c61f57d39 upstream.
+
+When reusing a TCP connection, ensure that it's aborted if a previous
+shutdown attempt has been made on that connection so that the RPC over
+TCP recovery mechanism succeeds.
+
+Signed-off-by: Andy Chittenden <andyc.bluearc at gmail.com>
+Signed-off-by: Trond Myklebust <Trond.Myklebust at netapp.com>
+---
+ net/sunrpc/xprtsock.c | 28 ++++++++++++++++++++++------
+ 1 files changed, 22 insertions(+), 6 deletions(-)
+
+diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
+index 7ca65c7..66d1369 100644
+--- a/net/sunrpc/xprtsock.c
++++ b/net/sunrpc/xprtsock.c
+@@ -1305,10 +1305,11 @@ static void xs_tcp_state_change(struct sock *sk)
+ if (!(xprt = xprt_from_sock(sk)))
+ goto out;
+ dprintk("RPC: xs_tcp_state_change client %p...\n", xprt);
+- dprintk("RPC: state %x conn %d dead %d zapped %d\n",
++ dprintk("RPC: state %x conn %d dead %d zapped %d sk_shutdown %d\n",
+ sk->sk_state, xprt_connected(xprt),
+ sock_flag(sk, SOCK_DEAD),
+- sock_flag(sk, SOCK_ZAPPED));
++ sock_flag(sk, SOCK_ZAPPED),
++ sk->sk_shutdown);
+
+ switch (sk->sk_state) {
+ case TCP_ESTABLISHED:
+@@ -1779,10 +1780,25 @@ static void xs_tcp_reuse_connection(struct rpc_xprt *xprt, struct sock_xprt *tra
+ {
+ unsigned int state = transport->inet->sk_state;
+
+- if (state == TCP_CLOSE && transport->sock->state == SS_UNCONNECTED)
+- return;
+- if ((1 << state) & (TCPF_ESTABLISHED|TCPF_SYN_SENT))
+- return;
++ if (state == TCP_CLOSE && transport->sock->state == SS_UNCONNECTED) {
++ /* we don't need to abort the connection if the socket
++ * hasn't undergone a shutdown
++ */
++ if (transport->inet->sk_shutdown == 0)
++ return;
++ dprintk("RPC: %s: TCP_CLOSEd and sk_shutdown set to %d\n",
++ __func__, transport->inet->sk_shutdown);
++ }
++ if ((1 << state) & (TCPF_ESTABLISHED|TCPF_SYN_SENT)) {
++ /* we don't need to abort the connection if the socket
++ * hasn't undergone a shutdown
++ */
++ if (transport->inet->sk_shutdown == 0)
++ return;
++ dprintk("RPC: %s: ESTABLISHED/SYN_SENT "
++ "sk_shutdown set to %d\n",
++ __func__, transport->inet->sk_shutdown);
++ }
+ xs_abort_connection(xprt, transport);
+ }
+
+--
+1.7.2.3
+
Modified: dists/sid/linux-2.6/debian/patches/series/28
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/28 Tue Nov 2 23:59:54 2010 (r16529)
+++ dists/sid/linux-2.6/debian/patches/series/28 Thu Nov 4 16:16:23 2010 (r16530)
@@ -14,3 +14,4 @@
+ features/all/udlfb/udlfb-module-options.patch
+ features/all/udlfb/udlfb-fix-incorrect-fb_defio-implementation.patch
+ features/all/udlfb/udlfb-checkpatch-style.patch
++ bugfix/all/sunrpc-fix-NFS-client-over-TCP-hangs-due-to-packet-loss.patch
More information about the Kernel-svn-changes
mailing list