summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-08-17 21:08:38 -0400
committerChuck Lever <cel@kernel.org>2026-09-13 20:36:54 -0400
commitd748701a19cc33024f5a2b90009dc861389fbfb9 (patch)
tree359b15667920ec5c7f3360b848ca6267a837aa62
parenta6f319612616b552e5e70ec6fb2523de193a3e59 (diff)
downloadlinux-next-d748701a19cc33024f5a2b90009dc861389fbfb9.tar.gz
linux-next-d748701a19cc33024f5a2b90009dc861389fbfb9.zip
NFSD: Name directory delegations in the CB_RECALL_ANY type mask
RFC 8881 Section 20.6.3 distinguishes an NFSv4.1 server implementation that shares one pool among all classes of recallable objects from one that keeps separate pools per class. NFSD falls in the former category. The CB_RECALL_ANY operation's craa_type_mask argument names the types of objects in the recallable resource pool, but NFSD's implementation does not name directory delegations, even though they are allocated through __alloc_init_deleg(), they are counted against the max_delegations budget, and the state shrinker reclaims them. Add RCA4_TYPE_MASK_DIR_DLG to craa_type_mask so clients that implement directory delegations consider them when choosing which delegations to return. Reviewed-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260817-recall-any-keep-count-v5-3-3b2cffce701e@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 8da7635babbb..f6da74ce16a9 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -7984,7 +7984,8 @@ deleg_reaper(struct nfsd_net *nn)
clp->cl_ra_time = ktime_get_boottime_seconds();
clp->cl_ra->ra_keep = 0;
clp->cl_ra->ra_bmval[0] = BIT(RCA4_TYPE_MASK_RDATA_DLG) |
- BIT(RCA4_TYPE_MASK_WDATA_DLG);
+ BIT(RCA4_TYPE_MASK_WDATA_DLG) |
+ BIT(RCA4_TYPE_MASK_DIR_DLG);
trace_nfsd_cb_recall_any(clp->cl_ra);
nfsd4_run_cb(&clp->cl_ra->ra_cb);
}