From: Trond Myklebust <trondmy@kernel.org>
To: "zhangjian (CG)" <zhangjian496@huawei.com>,
anna@kernel.org, Jeff Layton <jlayton@kernel.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Question]nfs: should nfs timeout even with NFS_CS_NO_RETRANS_TIMEOUT ?
Date: Thu, 12 Mar 2026 09:09:26 -0400 [thread overview]
Message-ID: <c42bc9a8ccb53e4afbb74734a9705459c45d7909.camel@kernel.org> (raw)
In-Reply-To: <77b2c3ea-52d0-4f2f-8cca-4481f3426fc5@huawei.com>
On Thu, 2026-03-12 at 12:19 +0800, zhangjian (CG) wrote:
>
>
> On 3/6/2026 12:49 PM, Trond Myklebust wrote:
> > On Fri, 2026-03-06 at 10:46 +0800, zhangjian (CG) wrote:
> > > Hi experts on NFS:
> > >
> > > Recently we meet an error:
> > > 1.Nfs wait for sunrpc
> > > 2.Sunrpc send OPEN message and hang the rpc task onto sunrpc
> > > pending
> > > queue.
> > > 3.Server never reply, and since NFS_CS_NO_RETRANS_TIMEOUT is
> > > forced
> > > and
> > > connection is ESTABLISHED, task will never be retransmitted.
> > > This cause procedures waiting on this file hang forever.
> > > I know using "umount -f " to kill rpc task works. And the key to
> > > the
> > > problem most likely lies in the network layer. But should nfs
> > > retransmit
> > > it after waiting for so long?
> > >
> > > Wish for reply. Thanks
> > >
> > > Zhangjian
> > >
> > Please read the NFSv4 spec. It very clearly states that the client
> > should never retransmit unless the connection breaks.
> >
>
> NFSv4 spec said client should never retransmit, but not said client
> need
> to wait forever. Maybe sunrpc should tell nfs -ETIMEOUT and nfs
> return
> ERROR rather than retransmit.
You are 100% free to use the existing 'soft' or 'softerr' mount options
if you have applications that can parse those (non-POSIX) errors.
Note however that there is no way to tell the server that you are
'cancelling' an RPC call, so it will hold onto that slot until it is
done executing the call (see RFC8881, Section 2.10.6.1.). So you are
eventually going to run out of usable slots, and the system will gum up
anyway.
The default mount option is 'hard', because those are the only
semantics that are compatible with POSIX and NFSv4.x.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trondmy@kernel.org, trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2026-03-12 13:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 12:48 [Question]nfs: never returned delegation zhangjian (CG)
2025-08-11 13:03 ` Trond Myklebust
2025-08-12 2:51 ` zhangjian (CG)
2025-09-01 9:07 ` Li Lingfeng
2025-09-01 11:40 ` Jeff Layton
2025-09-01 14:12 ` Li Lingfeng
2025-08-11 13:03 ` Jeff Layton
2025-08-11 13:06 ` Trond Myklebust
2025-08-12 2:45 ` zhangjian (CG)
2026-03-06 2:46 ` zhangjian (CG)
2026-03-06 4:49 ` Trond Myklebust
2026-03-12 4:19 ` [Question]nfs: should nfs timeout even with NFS_CS_NO_RETRANS_TIMEOUT ? zhangjian (CG)
2026-03-12 13:09 ` Trond Myklebust [this message]
2026-03-13 3:22 ` zhangjian (CG)
2026-03-13 15:18 ` 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=c42bc9a8ccb53e4afbb74734a9705459c45d7909.camel@kernel.org \
--to=trondmy@kernel.org \
--cc=anna@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=zhangjian496@huawei.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