Cookie order [Re: Special file names "." and ".." in READDIR response]

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Erez Zadok (ezk@cs.columbia.edu)
Date: 11/03/99-09:39:09 AM Z


Date: Wed, 3 Nov 1999 10:39:09 -0500 (EST)
Message-Id: <199911031539.KAA20760@shekel.mcl.cs.columbia.edu>
From: Erez Zadok <ezk@cs.columbia.edu>
Subject: Cookie order [Re: Special file names "." and ".." in READDIR response]

I'm new to this wg, and have not had time to read the whole spec yet.  (It's
a bit long. :-) Apologies if these are novice questions.

The current spec does not mention if the readdir cookies returned by the
server have any order.  Are they monotonically increasing, decreasing, or
should have no implied order.  The spec does mention this on page 133:

     "The cookie is similar in concept to a READ offset but should not be
     interpreted as such by the client."

This would imply that it is a monotonically increasing value, as read
offsets are.  I think the spec should decide if these cookies have any
implied order, and be more specific about it.

The Linux 2.3 NFS client, for example, implicitly assumes that cookies are
monotonically increasing.  The Amd automounter, which I maintain, could
sometimes produce cookies of decreasing numeric values (but unique of
course).  This was to support directory browsing of automounted mount
points.  I've had problems with Amd on Linux 2.3 hosts because of that;
parts of directories were not being interpreted by the client side and thus
became invisible to directory listing.  I've spoken to the linux person who
wrote that code and he said that he knew that he was (somewhat) breaking the
(V.2) spec, and that the problem will be fixed in linux 2.4.  I "fixed" the
problem by ensuring that Amd returns monotonically increasing cookies.

Nevertheless, I think it would be useful to add a statement to the V4 spec
clarifying this issue.  You say that clients should not assume that cookies
represent actual offsets, but should clients assume (the weaker statement)
that cookies are monotonically increasing?  I think not.

---
Erez Zadok.
Columbia University Department of Computer Science.
EMail: ezk@cs.columbia.edu           Web: http://www.cs.columbia.edu/~ezk


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.2 : 03/04/05-01:47:48 AM Z CST