aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2022-05-27 21:32:46 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2022-06-10 22:12:50 +0000
commit70efcaffa180d5b00c7b8eaca7a271693933a38c (patch)
treeae822a320f84b3a32f4c51130160c8671d9857ce
parentde5e5c428f498e481848c8a8290b6469b8b6d329 (diff)
downloadsrc-70efcaffa180d5b00c7b8eaca7a271693933a38c.tar.gz
src-70efcaffa180d5b00c7b8eaca7a271693933a38c.zip
nfscl: Add a diagnostic printf() for a "should never happen" case
When a NFSv4.1/4.2 session to the NFS server (not a pNFS DS) is replaced, the old session should always be marked defunct by nfsess_defunct being set non-zero. However, the hang reported by the PR suggests that this might be the case. This patch adds a printf() to indicate this has somehow happened. PR: 260011 (cherry picked from commit a7bb120f8b8735bc4c417b3c8fc2308c3d2964aa)
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index dc0b92db97bc..eac6c777324a 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -1060,8 +1060,12 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim,
* in-progress RPCs.
*/
tsep = NULL;
- if (TAILQ_FIRST(&nmp->nm_sess) != NULL)
+ if (TAILQ_FIRST(&nmp->nm_sess) != NULL) {
tsep = NFSMNT_MDSSESSION(nmp);
+ if (tsep->nfsess_defunct == 0)
+ printf("nfsrpc_setclient: "
+ "nfsess_defunct not set\n");
+ }
TAILQ_INSERT_HEAD(&nmp->nm_sess, dsp,
nfsclds_list);
/*