Subject: Re: Why make last argument to VOP_READDIR off_t?
To: Gordon W. Ross <gwr@mc.com>
From: Frank van der Linden <frank@wins.uva.nl>
List: tech-kern
Date: 10/10/1997 18:51:44
On Fri, Oct 10, 1997 at 10:47:28AM -0400, Gordon W. Ross wrote:
> Why was this done?  Does anyone think it might actually ever
> make any sense to have a directory offset larger that 32 bits?
> It seems to me that this will harm performance and provide no
> useful benefit in return.  Please explain...

Offsets are 64bits everywhere, so it is 1) to be consistent,
and 2) to be able to handle things such as NFS, that have 64bit
offset cookies. "Larger than" 32 bits actually doesn't apply,
because the cookies are supposed to be opaque values.

Without this change it is impossible to get completely correct.
NFS directory handling. You get into hairy translation schemes
that are always prone to error. This has been discussed before on
this list (I did announce that I was going to make this change..)

For native NetBSD binaries it actually doesn't make much of a
difference, the cookies to VOP_READDIR aren't used then, they
aren't even stored. The offsets from uio_offset are used. So
there will be no performance difference.

- Frank