linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
	<linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v3 11/15] SUNRPC: Make xs_tcp_close() do a socket shutdown rather than a sock_release
Date: Tue, 10 Feb 2015 10:54:18 -0500	[thread overview]
Message-ID: <54DA29AA.7060702@Netapp.com> (raw)
In-Reply-To: <1423522091-35365-12-git-send-email-trond.myklebust@primarydata.com>

Hi Trond,

On 02/09/2015 05:48 PM, Trond Myklebust wrote:
> Use of socket shutdown() means that we monitor the shutdown process
> through the xs_tcp_state_change() callback, so it is preferable to
> a full close in all cases unless we're destroying the transport.
> 
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
> ---
>  net/sunrpc/xprtsock.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index 3d83cbd32ef2..0279e8ffb14a 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -857,10 +857,7 @@ static void xs_close(struct rpc_xprt *xprt)
>  
>  static void xs_tcp_close(struct rpc_xprt *xprt)
>  {
> -	if (test_and_clear_bit(XPRT_CONNECTION_CLOSE, &xprt->state))
> -		xs_close(xprt);
> -	else
> -		xs_tcp_shutdown(xprt);
> +	xs_tcp_shutdown(xprt);

Can we remove xs_tcp_close() and call tcp_shutdown() directly instead?

Anna
>  }
>  
>  static void xs_xprt_free(struct rpc_xprt *xprt)
> @@ -1033,7 +1030,6 @@ static void xs_udp_data_ready(struct sock *sk)
>   */
>  static void xs_tcp_force_close(struct rpc_xprt *xprt)
>  {
> -	set_bit(XPRT_CONNECTION_CLOSE, &xprt->state);
>  	xprt_force_disconnect(xprt);
>  }
>  
> 


  parent reply	other threads:[~2015-02-10 15:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 22:47 [PATCH v3 00/15] Fix TCP connection port number reuse in NFSv3 Trond Myklebust
2015-02-09 22:47 ` [PATCH v3 01/15] SUNRPC: Set SO_REUSEPORT socket option for TCP connections Trond Myklebust
2015-02-09 22:47   ` [PATCH v3 02/15] SUNRPC: Handle EADDRINUSE on connect Trond Myklebust
2015-02-09 22:47     ` [PATCH v3 03/15] SUNRPC: Do not clear the source port in xs_reset_transport Trond Myklebust
2015-02-09 22:48       ` [PATCH v3 04/15] SUNRPC: Ensure xs_reset_transport() resets the close connection flags Trond Myklebust
2015-02-09 22:48         ` [PATCH v3 05/15] SUNRPC: Add helpers to prevent socket create from racing Trond Myklebust
2015-02-09 22:48           ` [PATCH v3 06/15] SUNRPC: TCP/UDP always close the old socket before reconnecting Trond Myklebust
2015-02-09 22:48             ` [PATCH v3 07/15] SUNRPC: Remove TCP client connection reset hack Trond Myklebust
2015-02-09 22:48               ` [PATCH v3 08/15] SUNRPC: Remove TCP socket linger code Trond Myklebust
2015-02-09 22:48                 ` [PATCH v3 09/15] SUNRPC: Cleanup to remove remaining uses of XPRT_CONNECTION_ABORT Trond Myklebust
2015-02-09 22:48                   ` [PATCH v3 10/15] SUNRPC: Ensure xs_tcp_shutdown() requests a full close of the connection Trond Myklebust
2015-02-09 22:48                     ` [PATCH v3 11/15] SUNRPC: Make xs_tcp_close() do a socket shutdown rather than a sock_release Trond Myklebust
2015-02-09 22:48                       ` [PATCH v3 12/15] SUNRPC: Remove the redundant XPRT_CONNECTION_CLOSE flag Trond Myklebust
2015-02-09 22:48                         ` [PATCH v3 13/15] SUNRPC: Handle connection reset more efficiently Trond Myklebust
2015-02-09 22:48                           ` [PATCH v3 14/15] SUNRPC: Define xs_tcp_fin_timeout only if CONFIG_SUNRPC_DEBUG Trond Myklebust
2015-02-09 22:48                             ` [PATCH v3 15/15] SUNRPC: Fix stupid typo in xs_sock_set_reuseport Trond Myklebust
2015-02-10 15:54                       ` Anna Schumaker [this message]
2015-02-10 16:10                         ` [PATCH v3 11/15] SUNRPC: Make xs_tcp_close() do a socket shutdown rather than a sock_release Trond Myklebust
2016-09-29 18:52           ` [PATCH v3 05/15] SUNRPC: Add helpers to prevent socket create from racing Olga Kornievskaia
2016-09-29 20:20             ` Olga Kornievskaia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54DA29AA.7060702@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).