netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [Bug 16494] NFS client over TCP hangs due to packet loss
@ 2010-08-03  8:14 Andy Chittenden
  0 siblings, 0 replies; 12+ messages in thread
From: Andy Chittenden @ 2010-08-03  8:14 UTC (permalink / raw)
  To: 'David S. Miller', 'Alexey Kuznetsov',
	'Pekka Savola (ipv6', 'James Morris',
	"'Hideaki Y
  Cc: akpm

I don't know whether this patch is the correct fix or not but it enables the
NFS client to recover.

Kernel version: 2.6.34.1 and 2.6.32.

Fixes <https://bugzilla.kernel.org/show_bug.cgi?id=16494>. It clears down
any previous shutdown attempts so that reconnects on a socket that's been
shutdown leave the socket in a usable state (otherwise tcp_sendmsg() returns
-EPIPE).

# diff -up /home/company/software/src/linux-2.6.34.1/net/ipv4/tcp_output.c
net/ipv4
--- /home/company/software/src/linux-2.6.34.1/net/ipv4/tcp_output.c
2010-07-27 08:46:46.917000000 +0100
+++ net/ipv4/tcp_output.c       2010-07-27 09:19:16.000000000 +0100
@@ -2522,6 +2522,13 @@ static void tcp_connect_init(struct sock
        struct tcp_sock *tp = tcp_sk(sk);
        __u8 rcv_wscale;

+       /* clear down any previous shutdown attempts so that
+        * reconnects on a socket that's been shutdown leave the
+        * socket in a usable state (otherwise tcp_sendmsg() returns
+        * -EPIPE).
+        */
+       sk->sk_shutdown = 0;
+
        /* We'll fix this up when we get a response from the other end.
         * See tcp_input.c:tcp_rcv_state_process case TCP_SYN_SENT.
         */

Signed-off-by: Andy Chittenden <andyc.bluearc@gmail.com>




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-20 16:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4c57cfe8.887b0e0a.2f79.4772@mx.google.com>
2010-08-03  8:21 ` [PATCH] [Bug 16494] NFS client over TCP hangs due to packet loss David Miller
     [not found]   ` <20100803.012144.267950450.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-08-03  9:11     ` Andrew Morton
     [not found]       ` <20100803021110.f0b3877b.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2010-08-03 10:25         ` Andy Chittenden
     [not found]           ` <4C57EE9A.7040308-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-08-05 14:55             ` Andy Chittenden
     [not found]               ` <4c5ad0d6.42ecd80a.47d7.0dfc-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2010-08-05 19:50                 ` Trond Myklebust
     [not found]                   ` <1281037822.2948.49.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-08-06  9:30                     ` Andy Chittenden
2010-08-09  9:27                       ` Andy Chittenden
2010-08-09 16:55                         ` Trond Myklebust
     [not found]                           ` <1281372927.8950.3.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-08-10  8:40                             ` Andy Chittenden
2018-06-19 21:56                         ` Joe Perches
2018-06-20 16:40                           ` Andy C
2010-08-03  8:14 Andy Chittenden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).