linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Dai Ngo <dai.ngo@oracle.com>,
	jlayton@kernel.org, neilb@suse.de, okorniev@redhat.com,
	tom@talpey.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] SUNRPC: call_connect_status needs to destroy transport on ETIMEDOUT before retry
Date: Mon, 4 Aug 2025 14:49:10 -0400	[thread overview]
Message-ID: <8c5fe5db-4f93-4d48-afda-8ee3996234d3@oracle.com> (raw)
In-Reply-To: <1754333198-62658-1-git-send-email-dai.ngo@oracle.com>

On 8/4/25 2:46 PM, Dai Ngo wrote:
> Currently, when an RPC connection times out during the connect phase,
> the task is retried by placing it back on the pending queue and waiting
> again. In some cases, the timeout occurs because TCP is unable to send
> the SYN packet. This situation most often arises on bare metal systems
> at boot time, when the NFS mount is attempted while the network link
> appears to be up but is not yet stable.
> 
> This patch addresses the issue by updating call_connect_status to destroy
> the transport on ETIMEDOUT error before retrying the connection. This
> ensures that subsequent connection attempts use a fresh transport,
> reducing the likelihood of repeated failures due to lingering network
> issues.
> 
> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
> ---
>  net/sunrpc/clnt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index 21426c3049d3..701b742750c5 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -2215,6 +2215,7 @@ call_connect_status(struct rpc_task *task)
>  	case -EHOSTUNREACH:
>  	case -EPIPE:
>  	case -EPROTO:
> +	case -ETIMEDOUT:
>  		xprt_conditional_disconnect(task->tk_rqstp->rq_xprt,
>  					    task->tk_rqstp->rq_connect_cookie);
>  		if (RPC_IS_SOFTCONN(task))
> @@ -2225,7 +2226,6 @@ call_connect_status(struct rpc_task *task)
>  	case -EADDRINUSE:
>  	case -ENOTCONN:
>  	case -EAGAIN:
> -	case -ETIMEDOUT:
>  		if (!(task->tk_flags & RPC_TASK_NO_ROUND_ROBIN) &&
>  		    (task->tk_flags & RPC_TASK_MOVEABLE) &&
>  		    test_bit(XPRT_REMOVE, &xprt->state)) {

Hello Dai, net/sunrpc/clnt.c is client-side. Can you resend to Trond and
Anna, please?


-- 
Chuck Lever

  reply	other threads:[~2025-08-04 18:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04 18:46 [PATCH 1/1] SUNRPC: call_connect_status needs to destroy transport on ETIMEDOUT before retry Dai Ngo
2025-08-04 18:49 ` Chuck Lever [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-08-04 19:08 Dai Ngo
2025-08-04 19:21 ` Trond Myklebust
2025-08-04 20:13   ` Dai Ngo
2025-08-04 23:55     ` Trond Myklebust
2025-08-05 15:46       ` Dai Ngo
2025-08-05 16:41         ` Trond Myklebust
2025-08-05 17:07           ` Dai Ngo
2025-08-05 17:41             ` Trond Myklebust
2025-08-05 18:25               ` Dai Ngo

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=8c5fe5db-4f93-4d48-afda-8ee3996234d3@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.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).