Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Oct 2024 00:46:17 GMT
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 83ac4cebe84e - stable/14 - Revert "nfscl: Enable support for the Lookup+Open RPC"
Message-ID:  <202410120046.49C0kH8A088758@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=83ac4cebe84e651e4130e0e31e0c3ceff7affaa1

commit 83ac4cebe84e651e4130e0e31e0c3ceff7affaa1
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2024-09-28 22:01:36 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2024-10-12 00:45:22 +0000

    Revert "nfscl: Enable support for the Lookup+Open RPC"
    
    This reverts commit 9792c7d3eb41dc1e3709e00a98734c3312d1b4fe.
    
    The email thread "panic: nfsv4root ref cnt cpuid=1"
    on freebsd-fs@freebsd.org descibes
    crashes that occurred for a NFSv4.1 client mount
    using "oneopenown" where the same file is re-opened
    many times by different processes.
    
    The crashes appear to have been caused by the use
    of the Lookup+Open RPC (which only happens for
    mounts using the "oneopenown" option).
    There appears to be a race between closure of the
    open and the open acquired by the Lookup+Open RPC.
    
    Since Lookup+Open RPCs are only an optimization
    and can only be done for "oneopenown" at this time,
    this patch reverts enabling of them.
    
    It may be possible to fix the code so that
    Lookup+Open works reliably, so the code is left
    in place (although it will never be executed) for now.
    
    Reported by:    J David <j.david.lists@gmail.com>
    
    (cherry picked from commit 6df05714da160a8ac3e27ee34ff903bd0e760002)
---
 sys/fs/nfsclient/nfs_clvnops.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 13341dfc26e0..bf24a161b94b 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -1309,6 +1309,11 @@ nfs_lookup(struct vop_lookup_args *ap)
 	}
 
 	openmode = 0;
+#if 0
+	/*
+	 * The use of LookupOpen breaks some builds.  It is disabled
+	 * until that is fixed.
+	 */
 	/*
 	 * If this an NFSv4.1/4.2 mount using the "oneopenown" mount
 	 * option, it is possible to do the Open operation in the same
@@ -1328,6 +1333,7 @@ nfs_lookup(struct vop_lookup_args *ap)
 			openmode |= NFSV4OPEN_ACCESSWRITE;
 	}
 	NFSUNLOCKMNT(nmp);
+#endif
 
 	newvp = NULLVP;
 	NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410120046.49C0kH8A088758>