All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <1434756359.8498.2.camel@primarydata.com>

diff --git a/a/1.txt b/N1/1.txt
index ffda15d..13903da 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -46,3 +46,116 @@ Is it causing any other damage than the rkhunter warning you reported?
 Sorry. I sent that one off too quickly. Try the following.
 
 8<--------------------------------------------------------------
+>From 4876cc779ff525b9c2376d8076edf47815e71f2c Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <trond.myklebust@primarydata.com>
+Date: Fri, 19 Jun 2015 16:17:57 -0400
+Subject: [PATCH v2] SUNRPC: Ensure we release the TCP socket once it has been
+ closed
+
+This fixes a regression introduced by commit caf4ccd4e88cf2 ("SUNRPC:
+Make xs_tcp_close() do a socket shutdown rather than a sock_release").
+Prior to that commit, the autoclose feature would ensure that an
+idle connection would result in the socket being both disconnected and
+released, whereas now only gets disconnected.
+
+While the current behaviour is harmless, it does leave the port bound
+until either RPC traffic resumes or the RPC client is shut down.
+
+Reported-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
+---
+ net/sunrpc/xprt.c     |  2 +-
+ net/sunrpc/xprtsock.c | 40 ++++++++++++++++++++++------------------
+ 2 files changed, 23 insertions(+), 19 deletions(-)
+
+diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
+index 3ca31f20b97c..ab5dd621ae0c 100644
+--- a/net/sunrpc/xprt.c
++++ b/net/sunrpc/xprt.c
+@@ -611,8 +611,8 @@ static void xprt_autoclose(struct work_struct *work)
+ 	struct rpc_xprt *xprt =
+ 		container_of(work, struct rpc_xprt, task_cleanup);
+ 
+-	xprt->ops->close(xprt);
+ 	clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
++	xprt->ops->close(xprt);
+ 	xprt_release_write(xprt, NULL);
+ }
+ 
+diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
+index fda8ec8c74c0..ee0715dfc3c7 100644
+--- a/net/sunrpc/xprtsock.c
++++ b/net/sunrpc/xprtsock.c
+@@ -623,24 +623,6 @@ process_status:
+ }
+ 
+ /**
+- * xs_tcp_shutdown - gracefully shut down a TCP socket
+- * @xprt: transport
+- *
+- * Initiates a graceful shutdown of the TCP socket by calling the
+- * equivalent of shutdown(SHUT_RDWR);
+- */
+-static void xs_tcp_shutdown(struct rpc_xprt *xprt)
+-{
+-	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
+-	struct socket *sock = transport->sock;
+-
+-	if (sock != NULL) {
+-		kernel_sock_shutdown(sock, SHUT_RDWR);
+-		trace_rpc_socket_shutdown(xprt, sock);
+-	}
+-}
+-
+-/**
+  * xs_tcp_send_request - write an RPC request to a TCP socket
+  * @task: address of RPC task that manages the state of an RPC request
+  *
+@@ -786,6 +768,7 @@ static void xs_sock_mark_closed(struct rpc_xprt *xprt)
+ 	xs_sock_reset_connection_flags(xprt);
+ 	/* Mark transport as closed and wake up all pending tasks */
+ 	xprt_disconnect_done(xprt);
++	xprt_force_disconnect(xprt);
+ }
+ 
+ /**
+@@ -2103,6 +2086,27 @@ out:
+ 	xprt_wake_pending_tasks(xprt, status);
+ }
+ 
++/**
++ * xs_tcp_shutdown - gracefully shut down a TCP socket
++ * @xprt: transport
++ *
++ * Initiates a graceful shutdown of the TCP socket by calling the
++ * equivalent of shutdown(SHUT_RDWR);
++ */
++static void xs_tcp_shutdown(struct rpc_xprt *xprt)
++{
++	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
++	struct socket *sock = transport->sock;
++
++	if (sock == NULL)
++		return;
++	if (xprt_connected(xprt)) {
++		kernel_sock_shutdown(sock, SHUT_RDWR);
++		trace_rpc_socket_shutdown(xprt, sock);
++	} else
++		xs_reset_transport(transport);
++}
++
+ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
+ {
+ 	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
+-- 
+2.4.3
+
+-- 
+Trond Myklebust
+Linux NFS client maintainer, PrimaryData
+trond.myklebust@primarydata.com
+
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+Please read the FAQ at  http://www.tux.org/lkml/
diff --git a/a/content_digest b/N1/content_digest
index 365c323..7ff0872 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -76,6 +76,119 @@
  "\n"
  "Sorry. I sent that one off too quickly. Try the following.\n"
  "\n"
- 8<--------------------------------------------------------------
+ "8<--------------------------------------------------------------\n"
+ ">From 4876cc779ff525b9c2376d8076edf47815e71f2c Mon Sep 17 00:00:00 2001\n"
+ "From: Trond Myklebust <trond.myklebust@primarydata.com>\n"
+ "Date: Fri, 19 Jun 2015 16:17:57 -0400\n"
+ "Subject: [PATCH v2] SUNRPC: Ensure we release the TCP socket once it has been\n"
+ " closed\n"
+ "\n"
+ "This fixes a regression introduced by commit caf4ccd4e88cf2 (\"SUNRPC:\n"
+ "Make xs_tcp_close() do a socket shutdown rather than a sock_release\").\n"
+ "Prior to that commit, the autoclose feature would ensure that an\n"
+ "idle connection would result in the socket being both disconnected and\n"
+ "released, whereas now only gets disconnected.\n"
+ "\n"
+ "While the current behaviour is harmless, it does leave the port bound\n"
+ "until either RPC traffic resumes or the RPC client is shut down.\n"
+ "\n"
+ "Reported-by: Steven Rostedt <rostedt@goodmis.org>\n"
+ "Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>\n"
+ "---\n"
+ " net/sunrpc/xprt.c     |  2 +-\n"
+ " net/sunrpc/xprtsock.c | 40 ++++++++++++++++++++++------------------\n"
+ " 2 files changed, 23 insertions(+), 19 deletions(-)\n"
+ "\n"
+ "diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c\n"
+ "index 3ca31f20b97c..ab5dd621ae0c 100644\n"
+ "--- a/net/sunrpc/xprt.c\n"
+ "+++ b/net/sunrpc/xprt.c\n"
+ "@@ -611,8 +611,8 @@ static void xprt_autoclose(struct work_struct *work)\n"
+ " \tstruct rpc_xprt *xprt =\n"
+ " \t\tcontainer_of(work, struct rpc_xprt, task_cleanup);\n"
+ " \n"
+ "-\txprt->ops->close(xprt);\n"
+ " \tclear_bit(XPRT_CLOSE_WAIT, &xprt->state);\n"
+ "+\txprt->ops->close(xprt);\n"
+ " \txprt_release_write(xprt, NULL);\n"
+ " }\n"
+ " \n"
+ "diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c\n"
+ "index fda8ec8c74c0..ee0715dfc3c7 100644\n"
+ "--- a/net/sunrpc/xprtsock.c\n"
+ "+++ b/net/sunrpc/xprtsock.c\n"
+ "@@ -623,24 +623,6 @@ process_status:\n"
+ " }\n"
+ " \n"
+ " /**\n"
+ "- * xs_tcp_shutdown - gracefully shut down a TCP socket\n"
+ "- * @xprt: transport\n"
+ "- *\n"
+ "- * Initiates a graceful shutdown of the TCP socket by calling the\n"
+ "- * equivalent of shutdown(SHUT_RDWR);\n"
+ "- */\n"
+ "-static void xs_tcp_shutdown(struct rpc_xprt *xprt)\n"
+ "-{\n"
+ "-\tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n"
+ "-\tstruct socket *sock = transport->sock;\n"
+ "-\n"
+ "-\tif (sock != NULL) {\n"
+ "-\t\tkernel_sock_shutdown(sock, SHUT_RDWR);\n"
+ "-\t\ttrace_rpc_socket_shutdown(xprt, sock);\n"
+ "-\t}\n"
+ "-}\n"
+ "-\n"
+ "-/**\n"
+ "  * xs_tcp_send_request - write an RPC request to a TCP socket\n"
+ "  * @task: address of RPC task that manages the state of an RPC request\n"
+ "  *\n"
+ "@@ -786,6 +768,7 @@ static void xs_sock_mark_closed(struct rpc_xprt *xprt)\n"
+ " \txs_sock_reset_connection_flags(xprt);\n"
+ " \t/* Mark transport as closed and wake up all pending tasks */\n"
+ " \txprt_disconnect_done(xprt);\n"
+ "+\txprt_force_disconnect(xprt);\n"
+ " }\n"
+ " \n"
+ " /**\n"
+ "@@ -2103,6 +2086,27 @@ out:\n"
+ " \txprt_wake_pending_tasks(xprt, status);\n"
+ " }\n"
+ " \n"
+ "+/**\n"
+ "+ * xs_tcp_shutdown - gracefully shut down a TCP socket\n"
+ "+ * @xprt: transport\n"
+ "+ *\n"
+ "+ * Initiates a graceful shutdown of the TCP socket by calling the\n"
+ "+ * equivalent of shutdown(SHUT_RDWR);\n"
+ "+ */\n"
+ "+static void xs_tcp_shutdown(struct rpc_xprt *xprt)\n"
+ "+{\n"
+ "+\tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n"
+ "+\tstruct socket *sock = transport->sock;\n"
+ "+\n"
+ "+\tif (sock == NULL)\n"
+ "+\t\treturn;\n"
+ "+\tif (xprt_connected(xprt)) {\n"
+ "+\t\tkernel_sock_shutdown(sock, SHUT_RDWR);\n"
+ "+\t\ttrace_rpc_socket_shutdown(xprt, sock);\n"
+ "+\t} else\n"
+ "+\t\txs_reset_transport(transport);\n"
+ "+}\n"
+ "+\n"
+ " static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)\n"
+ " {\n"
+ " \tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n"
+ "-- \n"
+ "2.4.3\n"
+ "\n"
+ "-- \n"
+ "Trond Myklebust\n"
+ "Linux NFS client maintainer, PrimaryData\n"
+ "trond.myklebust@primarydata.com\n"
+ "\n"
+ "\n"
+ "--\n"
+ "To unsubscribe from this list: send the line \"unsubscribe linux-kernel\" in\n"
+ Please read the FAQ at  http://www.tux.org/lkml/
 
-6d7dccef11b15f3c8c9a90e702bd421aca19106385db41492bc14fed26de176f
+cad29f124f5b65c289a0d2bdceb9911cfd0dcc9eca15a3f0bfbf5e53a4224518

diff --git a/a/1.txt b/N2/1.txt
index ffda15d..99b03a1 100644
--- a/a/1.txt
+++ b/N2/1.txt
@@ -1,6 +1,6 @@
 On Fri, 2015-06-19 at 18:14 -0400, Steven Rostedt wrote:
 > On Fri, 19 Jun 2015 16:30:18 -0400
-> Trond Myklebust <trond.myklebust@primarydata.com> wrote:
+> Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org> wrote:
 > 
 > > Steven, how about something like the following patch?
 > > 
@@ -46,3 +46,115 @@ Is it causing any other damage than the rkhunter warning you reported?
 Sorry. I sent that one off too quickly. Try the following.
 
 8<--------------------------------------------------------------
+>From 4876cc779ff525b9c2376d8076edf47815e71f2c Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>
+Date: Fri, 19 Jun 2015 16:17:57 -0400
+Subject: [PATCH v2] SUNRPC: Ensure we release the TCP socket once it has been
+ closed
+
+This fixes a regression introduced by commit caf4ccd4e88cf2 ("SUNRPC:
+Make xs_tcp_close() do a socket shutdown rather than a sock_release").
+Prior to that commit, the autoclose feature would ensure that an
+idle connection would result in the socket being both disconnected and
+released, whereas now only gets disconnected.
+
+While the current behaviour is harmless, it does leave the port bound
+until either RPC traffic resumes or the RPC client is shut down.
+
+Reported-by: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
+Signed-off-by: Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>
+---
+ net/sunrpc/xprt.c     |  2 +-
+ net/sunrpc/xprtsock.c | 40 ++++++++++++++++++++++------------------
+ 2 files changed, 23 insertions(+), 19 deletions(-)
+
+diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
+index 3ca31f20b97c..ab5dd621ae0c 100644
+--- a/net/sunrpc/xprt.c
++++ b/net/sunrpc/xprt.c
+@@ -611,8 +611,8 @@ static void xprt_autoclose(struct work_struct *work)
+ 	struct rpc_xprt *xprt =
+ 		container_of(work, struct rpc_xprt, task_cleanup);
+ 
+-	xprt->ops->close(xprt);
+ 	clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
++	xprt->ops->close(xprt);
+ 	xprt_release_write(xprt, NULL);
+ }
+ 
+diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
+index fda8ec8c74c0..ee0715dfc3c7 100644
+--- a/net/sunrpc/xprtsock.c
++++ b/net/sunrpc/xprtsock.c
+@@ -623,24 +623,6 @@ process_status:
+ }
+ 
+ /**
+- * xs_tcp_shutdown - gracefully shut down a TCP socket
+- * @xprt: transport
+- *
+- * Initiates a graceful shutdown of the TCP socket by calling the
+- * equivalent of shutdown(SHUT_RDWR);
+- */
+-static void xs_tcp_shutdown(struct rpc_xprt *xprt)
+-{
+-	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
+-	struct socket *sock = transport->sock;
+-
+-	if (sock != NULL) {
+-		kernel_sock_shutdown(sock, SHUT_RDWR);
+-		trace_rpc_socket_shutdown(xprt, sock);
+-	}
+-}
+-
+-/**
+  * xs_tcp_send_request - write an RPC request to a TCP socket
+  * @task: address of RPC task that manages the state of an RPC request
+  *
+@@ -786,6 +768,7 @@ static void xs_sock_mark_closed(struct rpc_xprt *xprt)
+ 	xs_sock_reset_connection_flags(xprt);
+ 	/* Mark transport as closed and wake up all pending tasks */
+ 	xprt_disconnect_done(xprt);
++	xprt_force_disconnect(xprt);
+ }
+ 
+ /**
+@@ -2103,6 +2086,27 @@ out:
+ 	xprt_wake_pending_tasks(xprt, status);
+ }
+ 
++/**
++ * xs_tcp_shutdown - gracefully shut down a TCP socket
++ * @xprt: transport
++ *
++ * Initiates a graceful shutdown of the TCP socket by calling the
++ * equivalent of shutdown(SHUT_RDWR);
++ */
++static void xs_tcp_shutdown(struct rpc_xprt *xprt)
++{
++	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
++	struct socket *sock = transport->sock;
++
++	if (sock == NULL)
++		return;
++	if (xprt_connected(xprt)) {
++		kernel_sock_shutdown(sock, SHUT_RDWR);
++		trace_rpc_socket_shutdown(xprt, sock);
++	} else
++		xs_reset_transport(transport);
++}
++
+ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
+ {
+ 	struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
+-- 
+2.4.3
+
+-- 
+Trond Myklebust
+Linux NFS client maintainer, PrimaryData
+trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org
+
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
diff --git a/a/content_digest b/N2/content_digest
index 365c323..22161e3 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -15,23 +15,24 @@
  "ref\020150619155226.7c5d6637@synchrony.poochiereds.net\0"
  "ref\01434745818.8838.1.camel@primarydata.com\0"
  "ref\020150619181440.22f54e6a@gandalf.local.home\0"
- "From\0Trond Myklebust <trond.myklebust@primarydata.com>\0"
+ "ref\020150619181440.22f54e6a-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org\0"
+ "From\0Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>\0"
  "Subject\0Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() )\0"
  "Date\0Fri, 19 Jun 2015 19:25:59 -0400\0"
- "To\0Steven Rostedt <rostedt@goodmis.org>\0"
- "Cc\0Jeff Layton <jlayton@poochiereds.net>"
-  Eric Dumazet <eric.dumazet@gmail.com>
-  Anna Schumaker <anna.schumaker@netapp.com>
-  Linux NFS Mailing List <linux-nfs@vger.kernel.org>
-  Linux Network Devel Mailing List <netdev@vger.kernel.org>
-  LKML <linux-kernel@vger.kernel.org>
-  Andrew Morton <akpm@linux-foundation.org>
- " Bruce James Fields <bfields@fieldses.org>\0"
+ "To\0Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>\0"
+ "Cc\0Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>"
+  Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
+  Anna Schumaker <anna.schumaker-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
+  Linux NFS Mailing List <linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+  Linux Network Devel Mailing List <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+  LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
+  Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
+ " Bruce James Fields <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>\0"
  "\00:1\0"
  "b\0"
  "On Fri, 2015-06-19 at 18:14 -0400, Steven Rostedt wrote:\n"
  "> On Fri, 19 Jun 2015 16:30:18 -0400\n"
- "> Trond Myklebust <trond.myklebust@primarydata.com> wrote:\n"
+ "> Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org> wrote:\n"
  "> \n"
  "> > Steven, how about something like the following patch?\n"
  "> > \n"
@@ -76,6 +77,118 @@
  "\n"
  "Sorry. I sent that one off too quickly. Try the following.\n"
  "\n"
- 8<--------------------------------------------------------------
+ "8<--------------------------------------------------------------\n"
+ ">From 4876cc779ff525b9c2376d8076edf47815e71f2c Mon Sep 17 00:00:00 2001\n"
+ "From: Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>\n"
+ "Date: Fri, 19 Jun 2015 16:17:57 -0400\n"
+ "Subject: [PATCH v2] SUNRPC: Ensure we release the TCP socket once it has been\n"
+ " closed\n"
+ "\n"
+ "This fixes a regression introduced by commit caf4ccd4e88cf2 (\"SUNRPC:\n"
+ "Make xs_tcp_close() do a socket shutdown rather than a sock_release\").\n"
+ "Prior to that commit, the autoclose feature would ensure that an\n"
+ "idle connection would result in the socket being both disconnected and\n"
+ "released, whereas now only gets disconnected.\n"
+ "\n"
+ "While the current behaviour is harmless, it does leave the port bound\n"
+ "until either RPC traffic resumes or the RPC client is shut down.\n"
+ "\n"
+ "Reported-by: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>\n"
+ "Signed-off-by: Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>\n"
+ "---\n"
+ " net/sunrpc/xprt.c     |  2 +-\n"
+ " net/sunrpc/xprtsock.c | 40 ++++++++++++++++++++++------------------\n"
+ " 2 files changed, 23 insertions(+), 19 deletions(-)\n"
+ "\n"
+ "diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c\n"
+ "index 3ca31f20b97c..ab5dd621ae0c 100644\n"
+ "--- a/net/sunrpc/xprt.c\n"
+ "+++ b/net/sunrpc/xprt.c\n"
+ "@@ -611,8 +611,8 @@ static void xprt_autoclose(struct work_struct *work)\n"
+ " \tstruct rpc_xprt *xprt =\n"
+ " \t\tcontainer_of(work, struct rpc_xprt, task_cleanup);\n"
+ " \n"
+ "-\txprt->ops->close(xprt);\n"
+ " \tclear_bit(XPRT_CLOSE_WAIT, &xprt->state);\n"
+ "+\txprt->ops->close(xprt);\n"
+ " \txprt_release_write(xprt, NULL);\n"
+ " }\n"
+ " \n"
+ "diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c\n"
+ "index fda8ec8c74c0..ee0715dfc3c7 100644\n"
+ "--- a/net/sunrpc/xprtsock.c\n"
+ "+++ b/net/sunrpc/xprtsock.c\n"
+ "@@ -623,24 +623,6 @@ process_status:\n"
+ " }\n"
+ " \n"
+ " /**\n"
+ "- * xs_tcp_shutdown - gracefully shut down a TCP socket\n"
+ "- * @xprt: transport\n"
+ "- *\n"
+ "- * Initiates a graceful shutdown of the TCP socket by calling the\n"
+ "- * equivalent of shutdown(SHUT_RDWR);\n"
+ "- */\n"
+ "-static void xs_tcp_shutdown(struct rpc_xprt *xprt)\n"
+ "-{\n"
+ "-\tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n"
+ "-\tstruct socket *sock = transport->sock;\n"
+ "-\n"
+ "-\tif (sock != NULL) {\n"
+ "-\t\tkernel_sock_shutdown(sock, SHUT_RDWR);\n"
+ "-\t\ttrace_rpc_socket_shutdown(xprt, sock);\n"
+ "-\t}\n"
+ "-}\n"
+ "-\n"
+ "-/**\n"
+ "  * xs_tcp_send_request - write an RPC request to a TCP socket\n"
+ "  * @task: address of RPC task that manages the state of an RPC request\n"
+ "  *\n"
+ "@@ -786,6 +768,7 @@ static void xs_sock_mark_closed(struct rpc_xprt *xprt)\n"
+ " \txs_sock_reset_connection_flags(xprt);\n"
+ " \t/* Mark transport as closed and wake up all pending tasks */\n"
+ " \txprt_disconnect_done(xprt);\n"
+ "+\txprt_force_disconnect(xprt);\n"
+ " }\n"
+ " \n"
+ " /**\n"
+ "@@ -2103,6 +2086,27 @@ out:\n"
+ " \txprt_wake_pending_tasks(xprt, status);\n"
+ " }\n"
+ " \n"
+ "+/**\n"
+ "+ * xs_tcp_shutdown - gracefully shut down a TCP socket\n"
+ "+ * @xprt: transport\n"
+ "+ *\n"
+ "+ * Initiates a graceful shutdown of the TCP socket by calling the\n"
+ "+ * equivalent of shutdown(SHUT_RDWR);\n"
+ "+ */\n"
+ "+static void xs_tcp_shutdown(struct rpc_xprt *xprt)\n"
+ "+{\n"
+ "+\tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n"
+ "+\tstruct socket *sock = transport->sock;\n"
+ "+\n"
+ "+\tif (sock == NULL)\n"
+ "+\t\treturn;\n"
+ "+\tif (xprt_connected(xprt)) {\n"
+ "+\t\tkernel_sock_shutdown(sock, SHUT_RDWR);\n"
+ "+\t\ttrace_rpc_socket_shutdown(xprt, sock);\n"
+ "+\t} else\n"
+ "+\t\txs_reset_transport(transport);\n"
+ "+}\n"
+ "+\n"
+ " static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)\n"
+ " {\n"
+ " \tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n"
+ "-- \n"
+ "2.4.3\n"
+ "\n"
+ "-- \n"
+ "Trond Myklebust\n"
+ "Linux NFS client maintainer, PrimaryData\n"
+ "trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org\n"
+ "\n"
+ "\n"
+ "--\n"
+ "To unsubscribe from this list: send the line \"unsubscribe linux-nfs\" in"
 
-6d7dccef11b15f3c8c9a90e702bd421aca19106385db41492bc14fed26de176f
+015750fb004b6595bdc736fb0b35c234f889f3f1320b5dae51a7626a5a8db63a

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.