Subject: Re: Directory cookies (a brief summary)

From: Mike Eisler <[email-masked]>
Date: Wed, 7 Feb 2001 09:06:38 -0800 (PST)

> A lot of discussion about directory cookies.  We have a proposal on
> the table to change the nfs_cookie4 definition from an uint64 to
> an opaque <>.

I don't think there's much support for that idea; it would double the
length of readdir results in the reiserfs case, and even worse, with
redundant data. Your summary neglects to mention my counter proposal to
define a special cookie value that tells the client that the component
name is the real cookie, and changes the readdir arguments to uses the
name or the integer cookie based on a discriminated union that uses the
special cookie value as the discriminator.

> The main issue is with the NFS client's ability to interact
> appropriately with the APIs on the client.  There has been a
> suggestion that the client may be able to implement a mechanism that
> would provide appropriate behavior for the telldir()/lseek()/seekdir()
> APIs but this claim seems a little weak at the moment.

As has been explained, the issue with reiserfs exists on whether the
application is using the API on a local reiserfs directory, or an NFS
mounted reiserfs directory.

> So at this point, I don't see a consensus as to changing the directory
> cookie unless we have some implementation experience with an
> appropriate solution for the client.

I agree we need implementation experience, and suggest that in absence
of a better one, my proposal be prototyped before modifying the
protocol.

	-mre

---

From: Neil Brown <[email-masked]>
Date: Thu, 8 Feb 2001 09:10:27 +1100 (EST)

> of a better one, my proposal be prototyped before modifying the

I"m pretty much in agreement... but thinking about the issues of
implementing the client side of name-based-cookies, it doesn't seem to
be fundamentally different from support 64bit cookies on a system with
a 32bit offset type (off_t).

Trond has told us about his attempts to manage 64bit cookies in
Linux.  Is anyone else implementing an NFSv4, or even NFSv3, client in
a 32bit API?  How do other people handle 64bit cookies?  Would there
be a significant difference using variable length cookies?

NeilBrown