aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2026-08-03 23:57:38 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2026-08-06 19:51:27 +0000
commitca0dcfd1a8ecbd7f4f99b06adcb5d67c8742679c (patch)
treea4bcd647b561f4d3a933e8df8eab20a3f5ac12d4
parentf93ab585852341bd5b8635cab1df7020eb677bd8 (diff)
nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79
Commit 4d80d4913e79 added a check for nfsess_defunct already being set. This was incorrect because, once set, nfsess_defunct remains set and an additional recovery might be needed. This patch reverts this part of 4d80d4913e79. PR: 297252 (cherry picked from commit 5ab48fb9f7ac43fb1242a678312a02df5d4d5b53)
-rw-r--r--sys/fs/nfs/nfs_commonkrpc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c
index 28f83f460245..e6c09c132a8a 100644
--- a/sys/fs/nfs/nfs_commonkrpc.c
+++ b/sys/fs/nfs/nfs_commonkrpc.c
@@ -1261,9 +1261,15 @@ tryagain:
}
sep = NFSMNT_MDSSESSION(nmp);
if (bcmp(sep->nfsess_sessionid,
- nd->nd_sessionid, NFSX_V4SESSIONID) == 0 &&
- sep->nfsess_defunct == 0) {
- /* Initiate recovery. */
+ nd->nd_sessionid, NFSX_V4SESSIONID) == 0) {
+ /*
+ * Initiate recovery. Even if
+ * nfsess_defunct is already set,
+ * another recovery may be needed.
+ * NFSCLFLAGS_RECVRINPRG |
+ * NFSCLFLAGS_RECOVER should avoid
+ * recovery storms.
+ */
sep->nfsess_defunct = 1;
NFSCL_DEBUG(1, "Marked defunct\n");
if (nmp->nm_clp != NULL &&