diff for duplicates of <1434745818.8838.1.camel@primarydata.com> diff --git a/a/1.txt b/N1/1.txt index 3f17031..f03d5a5 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -85,3 +85,80 @@ the socket. Steven, how about something like the following patch? 8<----------------------------------------------------------------- +>From 9a0bcfdbdbc793eae1ed6d901a6396b6c66f9513 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] 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 | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 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..75dcdadf0269 100644 +--- a/net/sunrpc/xprtsock.c ++++ b/net/sunrpc/xprtsock.c +@@ -634,10 +634,13 @@ 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) { ++ 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); + } + + /** +@@ -786,6 +789,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); + } + + /** +-- +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 ee86052..ddc7bd5 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -113,6 +113,83 @@ "\n" "Steven, how about something like the following patch?\n" "\n" - 8<----------------------------------------------------------------- + "8<-----------------------------------------------------------------\n" + ">From 9a0bcfdbdbc793eae1ed6d901a6396b6c66f9513 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] 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 | 8 ++++++--\n" + " 2 files changed, 7 insertions(+), 3 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..75dcdadf0269 100644\n" + "--- a/net/sunrpc/xprtsock.c\n" + "+++ b/net/sunrpc/xprtsock.c\n" + "@@ -634,10 +634,13 @@ static void xs_tcp_shutdown(struct rpc_xprt *xprt)\n" + " \tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n" + " \tstruct socket *sock = transport->sock;\n" + " \n" + "-\tif (sock != NULL) {\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}\n" + "+\t} else\n" + "+\t\txs_reset_transport(transport);\n" + " }\n" + " \n" + " /**\n" + "@@ -786,6 +789,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" + "-- \n" + "2.4.3\n" + "\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/ -c7e5e294589faea8aa38e128b05a16c2e1c3e1bf666e5c54d238b71b81ce54ed +5441b2d38e75770fd1cd0c436e027f25c9ff56a2a15123aff7347fee814dc9fa
diff --git a/a/1.txt b/N2/1.txt index 3f17031..451f733 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,11 +1,11 @@ On Fri, 2015-06-19 at 15:52 -0400, Jeff Layton wrote: > On Fri, 19 Jun 2015 13:39:08 -0400 -> Trond Myklebust <trond.myklebust@primarydata.com> wrote: +> Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org> wrote: > > > On Fri, Jun 19, 2015 at 1:17 PM, Steven Rostedt < -> > rostedt@goodmis.org> wrote: +> > rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org> wrote: > > > On Fri, 19 Jun 2015 12:25:53 -0400 -> > > Steven Rostedt <rostedt@goodmis.org> wrote: +> > > Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org> wrote: > > > > > > > > > > I don't see that 55201 anywhere. But then again, I didn't look @@ -85,3 +85,79 @@ the socket. Steven, how about something like the following patch? 8<----------------------------------------------------------------- +>From 9a0bcfdbdbc793eae1ed6d901a6396b6c66f9513 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] 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 | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 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..75dcdadf0269 100644 +--- a/net/sunrpc/xprtsock.c ++++ b/net/sunrpc/xprtsock.c +@@ -634,10 +634,13 @@ 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) { ++ 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); + } + + /** +@@ -786,6 +789,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); + } + + /** +-- +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 ee86052..f6b3c72 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -13,28 +13,29 @@ "ref\020150619131759.7b38d9de@gandalf.local.home\0" "ref\0CAHQdGtRCYoeToxyDHjnd+6f40J8SrScmQKKOW5O8AzJo3NefAA@mail.gmail.com\0" "ref\020150619155226.7c5d6637@synchrony.poochiereds.net\0" - "From\0Trond Myklebust <trond.myklebust@primarydata.com>\0" + "ref\020150619155226.7c5d6637-08S845evdOaAjSkqwZiSMmfYqLom42DlXqFh9Ls21Oc@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 16:30:18 -0400\0" - "To\0Jeff Layton <jlayton@poochiereds.net>\0" - "Cc\0Steven Rostedt <rostedt@goodmis.org>" - 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\0Jeff Layton <jlayton-vpEMnDpepFuMZCB2o+C8xQ@public.gmane.org>\0" + "Cc\0Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@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 15:52 -0400, Jeff Layton wrote:\n" "> On Fri, 19 Jun 2015 13:39:08 -0400\n" - "> Trond Myklebust <trond.myklebust@primarydata.com> wrote:\n" + "> Trond Myklebust <trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org> wrote:\n" "> \n" "> > On Fri, Jun 19, 2015 at 1:17 PM, Steven Rostedt <\n" - "> > rostedt@goodmis.org> wrote:\n" + "> > rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org> wrote:\n" "> > > On Fri, 19 Jun 2015 12:25:53 -0400\n" - "> > > Steven Rostedt <rostedt@goodmis.org> wrote:\n" + "> > > Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org> wrote:\n" "> > > \n" "> > > \n" "> > > > I don't see that 55201 anywhere. But then again, I didn't look \n" @@ -113,6 +114,82 @@ "\n" "Steven, how about something like the following patch?\n" "\n" - 8<----------------------------------------------------------------- + "8<-----------------------------------------------------------------\n" + ">From 9a0bcfdbdbc793eae1ed6d901a6396b6c66f9513 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] 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 | 8 ++++++--\n" + " 2 files changed, 7 insertions(+), 3 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..75dcdadf0269 100644\n" + "--- a/net/sunrpc/xprtsock.c\n" + "+++ b/net/sunrpc/xprtsock.c\n" + "@@ -634,10 +634,13 @@ static void xs_tcp_shutdown(struct rpc_xprt *xprt)\n" + " \tstruct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);\n" + " \tstruct socket *sock = transport->sock;\n" + " \n" + "-\tif (sock != NULL) {\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}\n" + "+\t} else\n" + "+\t\txs_reset_transport(transport);\n" + " }\n" + " \n" + " /**\n" + "@@ -786,6 +789,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" + "-- \n" + "2.4.3\n" + "\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" -c7e5e294589faea8aa38e128b05a16c2e1c3e1bf666e5c54d238b71b81ce54ed +6697c2d9a6ba054488b03de5d27f0fdb3fd2b5da2a4dce29fe868b2e8bdf0d61
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.