nfscl: Add a console message for session recovery

The NFSv4.1/4.2 client does recovery when it receives a
NFSERR_BADSESSION reply from the server.  If the server has
not rebooted, this is often caused by multiple clients using
the same /etc/hostid and, as such, not being recognized as
different clients by the server.

This trivial patch adds a console message to suggest that
client's /etc/hostid's need to be checked for uniqueness.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2022-08-28 14:24:39 -07:00
parent 31937f7e84
commit 0685c73cfe

View File

@ -1131,6 +1131,10 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
sep = NFSMNT_MDSSESSION(nmp);
if (bcmp(sep->nfsess_sessionid, nd->nd_sequence,
NFSX_V4SESSIONID) == 0) {
printf("Initiate recovery. If server "
"has not rebooted, "
"check NFS clients for unique "
"/etc/hostid's\n");
/* Initiate recovery. */
sep->nfsess_defunct = 1;
NFSCL_DEBUG(1, "Marked defunct\n");