diff options
author | dillon <dillon@FreeBSD.org> | 1999-09-29 17:14:58 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-09-29 17:14:58 +0000 |
commit | af7bbb9a33441701ff5146882af25965b2f6a467 (patch) | |
tree | 09639e910c57a0f9c7d7aa3f23c05f727a588b8f | |
parent | 772404948c69414c95f54c1916194958d0c47172 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/nfs/nfs_serv.c | 4 | ||||
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 4 |
2 files changed, 8 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); diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 2c6a05f..c3ace8c 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/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); |