The branch stable/13 has been updated by rmacklem:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9432f23197d8feac68f42066059638db27a2864c

commit 9432f23197d8feac68f42066059638db27a2864c
Author:     Rick Macklem <rmack...@freebsd.org>
AuthorDate: 2022-08-28 21:24:39 +0000
Commit:     Rick Macklem <rmack...@freebsd.org>
CommitDate: 2022-09-16 22:21:11 +0000

    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.
    
    (cherry picked from commit 0685c73cfe88b94d60b1b2ddfdb36c684a008006)
---
 sys/fs/nfs/nfs_commonkrpc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c
index 91ebd84fabd0..9badd8be47d4 100644
--- a/sys/fs/nfs/nfs_commonkrpc.c
+++ b/sys/fs/nfs/nfs_commonkrpc.c
@@ -1131,6 +1131,10 @@ tryagain:
                                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");

Reply via email to