From: Jeff Layton <jlayton@kernel.org>
To: cel@kernel.org, Neil Brown <neilb@suse.de>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [RFC PATCH] NFSD: Skip sending CB_RECALL_ANY when the backchannel isn't up
Date: Tue, 14 Jan 2025 17:46:58 -0500 [thread overview]
Message-ID: <1d9b4fb46f6eef50de04b22e31165eea132e0d8d.camel@kernel.org> (raw)
In-Reply-To: <20250114220924.2437687-1-cel@kernel.org>
On Tue, 2025-01-14 at 17:09 -0500, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> NFSD sends CB_RECALL_ANY to clients when the server is low on
> memory or that client has a large number of delegations outstanding.
>
> We've seen cases where NFSD attempts to send CB_RECALL_ANY requests
> to disconnected clients, and gets confused. These calls never go
> anywhere if a backchannel transport to the target client isn't
> available. Before the server can send any backchannel operation, the
> client has to connect first and then do a BIND_CONN_TO_SESSION.
>
> This patch doesn't address the root cause of the confusion, but
> there's no need to queue up these optional operations if they can't
> go anywhere.
>
> Fixes: 44df6f439a17 ("NFSD: add delegation reaper to react to low memory condition")
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> fs/nfsd/nfs4state.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index b7a0cfd05401..9ef32b19198c 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -6867,7 +6867,8 @@ deleg_reaper(struct nfsd_net *nn)
> clp->cl_ra_time < 5)) {
> continue;
> }
> - list_add(&clp->cl_ra_cblist, &cblist);
> + if (clp->cl_cb_state == NFSD4_CB_UP)
> + list_add(&clp->cl_ra_cblist, &cblist);
>
> /* release in nfsd4_cb_recall_any_release */
> kref_get(&clp->cl_nfsdfs.cl_ref);
Sounds like a reasonable thing to do.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2025-01-14 22:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 22:09 [RFC PATCH] NFSD: Skip sending CB_RECALL_ANY when the backchannel isn't up cel
2025-01-14 22:46 ` Jeff Layton [this message]
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=1d9b4fb46f6eef50de04b22e31165eea132e0d8d.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--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