home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.protocols.nfs
- Path: sparky!uunet!mcsun!sunic!dkuug!daimi!glad
- From: glad@daimi.aau.dk (Michael Glad)
- Subject: Re: NFS cookies
- Message-ID: <1992Dec14.090444.7597@daimi.aau.dk>
- Sender: news@daimi.aau.dk
- Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
- References: <7594@fury.BOEING.COM>
- Date: Mon, 14 Dec 92 09:04:44 GMT
- Lines: 31
-
- krm@sdc.boeing.com (Keith Michaels) writes:
-
- >Does anyone know what the practical limitations are for the 32 bit
- >NFS "cookie" that is used in the READDIR function? Some servers use
- >only printable characters in the cookie; this may be a concession to
- >clients that manipulate it with strcpy(), but if so it unnecessarily
- >limits the range of cookie values (only the zero byte must be avoided).
- >Does the protocol sanction the use of unprintable cookies?
-
- Many NFS implementations use file offsets into the directory file as
- cookie values. The RFC states that cookies are 'opaque' meaning that
- you can put whatever you want into them. DO NO DO THAT!! An example:
- if you use all ones as an end-of-directory cookie, at least one
- client nfs implementation will say 'oh: the directory has grown, lets better
- cache the new size'. On 'ls -l' output, the directory will then appear
- with size '-1' for some time.
-
- Let the cookie values live in the interval [0, (virtual) directory size].
-
- >This is not just of theoretical interest! We have acually hit this problem
- >on recursive operations like find. The result is duplicate files returned.
-
- That's what may happen. I had the above problems with some SunOS release,
- I think it was 4.0.3 or 4.1.1. I never saw the problem with HP-UX.
-
- >Surely there's a more graceful -- more correct -- way of handling this!
-
- I doubt so.
-
- -- Michael Glad, email: glad@daimi.aau.dk
-
-