All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@hammerspace.com>
To: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Subject: Re: [PATCH v1] SUNRPC: Ensure backchannel transports are marked connected
Date: Thu, 19 Aug 2021 13:01:37 +0000	[thread overview]
Message-ID: <ed3fbd005a9a2e3a6217085ebe05e80cd78766ba.camel@hammerspace.com> (raw)
In-Reply-To: <162937592206.2298.13447589794033256951.stgit@klimt.1015granger.net>

On Thu, 2021-08-19 at 08:29 -0400, Chuck Lever wrote:
> With NFSv4.1+ on RDMA, backchannel recovery appears not to work.
> 
> xprt_setup_xxx_bc() is invoked by the client's first CREATE_SESSION
> operation, and it always marks the rpc_clnt's transport as
> connected.
> 
> On a subsequent CREATE_SESSION, if rpc_create() is called and
> xpt_bc_xprt is populated, it might not be connected (for instance,
> if a backchannel fault has occurred). Ensure that code path returns
> a connected xprt also.
> 
> Reported-by: Timo Rothenpieler <timo@rothenpieler.org>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  net/sunrpc/clnt.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index 8b4de70e8ead..570480a649a3 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -535,6 +535,7 @@ struct rpc_clnt *rpc_create(struct
> rpc_create_args *args)
>                 xprt = args->bc_xprt->xpt_bc_xprt;
>                 if (xprt) {
>                         xprt_get(xprt);
> +                       xprt_set_connected(xprt);
>                         return rpc_create_xprt(args, xprt);
>                 }
>         }
> 
> 

No. This is wrong. If the connection got disconnected, then the client
needs to reconnect and build a new connection altogether. We can't just
make pretend that the old connection still exists.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



  reply	other threads:[~2021-08-19 13:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 12:29 [PATCH v1] SUNRPC: Ensure backchannel transports are marked connected Chuck Lever
2021-08-19 13:01 ` Trond Myklebust [this message]
2021-08-19 13:16   ` Chuck Lever III
2021-08-19 14:14     ` Trond Myklebust
2021-08-19 14:34       ` Chuck Lever III
2021-08-20  0:14         ` Trond Myklebust
2021-08-20 13:58           ` Chuck Lever III
2021-08-20 14:31             ` Trond Myklebust

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=ed3fbd005a9a2e3a6217085ebe05e80cd78766ba.camel@hammerspace.com \
    --to=trondmy@hammerspace.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /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 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.