From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 0/4] NFSD: CB_RECALL_ANY fixes and a meaningful keep count
Date: Wed, 12 Aug 2026 06:26:33 -0400 [thread overview]
Message-ID: <fdf2b1208d6bfcafbffff7a4a757e46b9a0a7c16.camel@kernel.org> (raw)
In-Reply-To: <20260811-recall-any-keep-count-v1-0-de9ca00493b7@kernel.org>
On Tue, 2026-08-11 at 15:52 -0400, Chuck Lever wrote:
> NFSD sends every CB_RECALL_ANY with craa_objects_to_keep set to
> zero. RFC 8881 Section 20.6.3 reads that as a request to retain no
> delegation at all, whether or not the delegation backs a file an
> application still has open.
>
> NFSD meant the callback as a signal to return unused delegations.
> Only the Linux client has been tested against it, and that client
> ignores craa_objects_to_keep and returns every unused delegation of
> the named types, so the fixed zero never produced visible
> misbehavior.
>
> The NFSv4.0 recipient bug is fixed on its own so it can be
> backported to LTS ahead of the rest. An NFSv4.0 callback service
> rejects CB_RECALL_ANY, and nothing brings the callback channel back
> up afterward (patch 1).
>
> The keep count comes from a new per-client delegation count rather
> than a walk of cl_delegations (patch 2). deleg_reaper() runs under
> nn->client_lock, and cl_delegations is serialized by nn->deleg_lock,
> which nests outside it, so the reaper cannot count the list. It
> reads the counter without the lock and may not depend on the value.
>
> Each callback asks a client to give up one delegation. A larger
> request reaches delegations that applications still have open, and
> both reaper callers re-arm while their condition lasts. A client
> holding a single delegation is skipped rather than sent the old
> zero. That strands one delegation per client, which this
> best-effort design accepts for now.
>
> NFSD sets no recall target and remembers nothing across callbacks.
> RFC 8881 Section 20.6.4 prescribes CB_RECALL against specific
> delegations once a client fails to return any. NFSD does not take
> that step yet. CB_RECALL_ANY is asynchronous and reports no
> completion, so NFSD treats it as advisory.
>
> ---
> Chuck Lever (4):
> NFSD: Do not send CB_RECALL_ANY to NFSv4.0 clients
> NFSD: Count the delegations held by each client
> NFSD: Name directory delegations in the CB_RECALL_ANY type mask
> NFSD: Send a meaningful CB_RECALL_ANY keep count
>
> fs/nfsd/nfs4state.c | 27 +++++++++++++++++++++++----
> fs/nfsd/state.h | 2 ++
> 2 files changed, 25 insertions(+), 4 deletions(-)
> ---
> base-commit: 1d479c6b53f684b27da84ec352b7efb97f7f115f
> change-id: 20260810-recall-any-keep-count-f50c2ae1b792
>
> Best regards,
> --
> Chuck Lever <cel@kernel.org>
Looks reasonable.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2026-08-12 10:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 19:52 [PATCH 0/4] NFSD: CB_RECALL_ANY fixes and a meaningful keep count Chuck Lever
2026-08-11 19:52 ` [PATCH 1/4] NFSD: Do not send CB_RECALL_ANY to NFSv4.0 clients Chuck Lever
2026-08-11 19:52 ` [PATCH 2/4] NFSD: Count the delegations held by each client Chuck Lever
2026-08-11 19:52 ` [PATCH 3/4] NFSD: Name directory delegations in the CB_RECALL_ANY type mask Chuck Lever
2026-08-11 19:52 ` [PATCH 4/4] NFSD: Send a meaningful CB_RECALL_ANY keep count Chuck Lever
2026-08-12 6:17 ` Cedric Blancher
2026-08-12 10:29 ` Jeff Layton
2026-08-12 14:02 ` Chuck Lever
2026-08-12 10:26 ` 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=fdf2b1208d6bfcafbffff7a4a757e46b9a0a7c16.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=cel@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--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 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.