summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-09-29 17:14:58 +0000
committerdillon <dillon@FreeBSD.org>1999-09-29 17:14:58 +0000
commitaf7bbb9a33441701ff5146882af25965b2f6a467 (patch)
tree09639e910c57a0f9c7d7aa3f23c05f727a588b8f /sys/nfs
parent772404948c69414c95f54c1916194958d0c47172 (diff)
downloadFreeBSD-src-af7bbb9a33441701ff5146882af25965b2f6a467.zip
FreeBSD-src-af7bbb9a33441701ff5146882af25965b2f6a467.tar.gz
Make FreeBSD less conservative in determining when to return a cookie
error for a directory. I have made this change after a great deal of review although I cannot be absolutely sure that this meets the spec. The issue devolves into whether changes in an underlying (UFS) directory can cause NFS directory blocks to be renumbered. My read of the code indicates that NFS directory blocks will not be renumbered, which means that the cookies should still remain valid after a change is made to the underlying directory. This being the case, a cookie error should not be returned when a change is made to the underlying directory and, instead, the NFS client should rely on mtime detection to invalidate and reload the directory. The use of mtime is problematic in of itself, due to insufficient resolution, which is why I believe the original conservative error handling was done. Still, there have been dozens of bug reports by people needing solaris<->FreeBSD interoperability and these have to be accomodated.
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_serv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 2c6a05f..c3ace8c 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -3032,11 +3032,13 @@ nfsrv_readdir(nfsd, slp, procp, mrq)
nqsrv_getl(vp, ND_READ);
if (v3) {
error = getret = VOP_GETATTR(vp, &at, cred, procp);
+#if 0
/*
* XXX This check may be too strict for Solaris 2.5 clients.
*/
if (!error && toff && verf && verf != at.va_filerev)
error = NFSERR_BAD_COOKIE;
+#endif
}
if (!error)
error = nfsrv_access(vp, VEXEC, cred, rdonly, procp, 0);
@@ -3312,11 +3314,13 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq)
goto nfsmout;
}
error = getret = VOP_GETATTR(vp, &at, cred, procp);
+#if 0
/*
* XXX This check may be too strict for Solaris 2.5 clients.
*/
if (!error && toff && verf && verf != at.va_filerev)
error = NFSERR_BAD_COOKIE;
+#endif
if (!error) {
nqsrv_getl(vp, ND_READ);
error = nfsrv_access(vp, VEXEC, cred, rdonly, procp, 0);
OpenPOWER on IntegriCloud