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 RFC 1/4] NFS: Unset RPC_TASK_NO_RETRANS_TIMEOUT for async lease renewal
Date: Wed, 14 Jul 2021 16:00:41 +0000 [thread overview]
Message-ID: <2debf0bf8076dd81d7aa413a31c32fe48ad06961.camel@hammerspace.com> (raw)
In-Reply-To: <162627781762.1294.17862468684529354297.stgit@manet.1015granger.net>
On Wed, 2021-07-14 at 11:50 -0400, Chuck Lever wrote:
> In some rare failure modes, the server is actually reading the
> transport, but then just dropping the requests on the floor.
> TCP_USER_TIMEOUT cannot detect that case.
>
> Prevent such a stuck server from pinning client resources
> indefinitely by ensuring that async lease renewal requests can time
> out even if the connection is still operational.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> fs/nfs/nfs4proc.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index e1214bb6b7ee..346217f6a00b 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -5612,6 +5612,12 @@ struct nfs4_renewdata {
> * nfs4_proc_async_renew(): This is not one of the nfs_rpc_ops; it
> is a special
> * standalone procedure for queueing an asynchronous RENEW.
> */
> +static void nfs4_renew_prepare(struct rpc_task *task, void
> *calldata)
> +{
> + task->tk_flags &= ~RPC_TASK_NO_RETRANS_TIMEOUT;
> + rpc_call_start(task);
> +}
> +
> static void nfs4_renew_release(void *calldata)
> {
> struct nfs4_renewdata *data = calldata;
> @@ -5650,6 +5656,7 @@ static void nfs4_renew_done(struct rpc_task
> *task, void *calldata)
> }
>
> static const struct rpc_call_ops nfs4_renew_ops = {
> + .rpc_call_prepare = nfs4_renew_prepare,
> .rpc_call_done = nfs4_renew_done,
> .rpc_release = nfs4_renew_release,
> };
> @@ -9219,6 +9226,8 @@ static void nfs41_sequence_prepare(struct
> rpc_task *task, void *data)
> struct nfs4_sequence_args *args;
> struct nfs4_sequence_res *res;
>
> + task->tk_flags &= ~RPC_TASK_NO_RETRANS_TIMEOUT;
> +
> args = task->tk_msg.rpc_argp;
> res = task->tk_msg.rpc_resp;
>
>
>
This isn't necessary. The server isn't allowed to drop these calls on
the floor.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2021-07-14 16:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 15:50 [PATCH RFC 0/4] Ensure RPC_TASK_NORTO is disabled for select operations Chuck Lever
2021-07-14 15:50 ` [PATCH RFC 1/4] NFS: Unset RPC_TASK_NO_RETRANS_TIMEOUT for async lease renewal Chuck Lever
2021-07-14 16:00 ` Trond Myklebust [this message]
2021-07-14 17:53 ` Chuck Lever III
2021-07-14 18:26 ` Trond Myklebust
2021-07-14 15:50 ` [PATCH RFC 2/4] NFS: Unset RPC_TASK_NO_RETRANS_TIMEOUT for session/clientid destruction Chuck Lever
2021-07-14 15:59 ` Trond Myklebust
2021-07-14 15:50 ` [PATCH RFC 3/4] SUNRPC: Refactor rpc_ping() Chuck Lever
2021-07-14 15:50 ` [PATCH RFC 4/4] SUNRPC: Unset RPC_TASK_NO_RETRANS_TIMEOUT for NULL RPCs Chuck Lever
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=2debf0bf8076dd81d7aa413a31c32fe48ad06961.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox