Subject: Re: Linux compatibility/NFS
To: None <rick@snowhite.cis.uoguelph.ca>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-kern
Date: 05/25/2002 02:03:30
Hi Rick,
On Fri, May 24, 2002 at 11:15:33AM -0400, rick@snowhite.cis.uoguelph.ca wrote:
> Sadly, the only "fix" I can think of is for nfs_readdir() to hold onto all
> directory offsets for open directories and then generate a "fake 32/64bit byte
> offset that monotonically increases by the size of data returned" that's
> returned through nfs_readdir(). Ugly, but it's the only way
> I can see that will make Linux binaries work correctly?
I actually implemented that back when I redid the cookie stuff. The
'-X' option to mount_nfs will do this, it uses the already available
cookie hash table to generate a fake 32 bit value. It's documented
in the compat_linux.8 manpage, even.
I also added a heuristic to see if offset cookies are byteswapped,
but it's a fairly simple check (this could be made into an
explicit mount option, I have no objection against that).
Without -X, a dumb linux binary may see problems. However, I still stand
by my opinion that the NFS code should not be complicated further because
of a lousy glibc implementation. A fix can possibly go into the
linux compat code. That's the place where bug-compatibility hacks
belong after all :) Even though it'll be a bit harder.
> fyi: I am just testing the server side of my nfsv4 code against the Univ. of
> Michigan client, so I might have a snapshot with V4 in it, later this
> summer. The code is pretty well vanilla BSD, so it avoids the above and
> will not be ready for public consumption for quite some time, but it is
> slowly getting there. (It looks like it'll be a while before other
> mature NFS V4 implementations hit the street, anyhow.)
>
> I have no idea if NetBSD is interesting in adopting it, but I'll
> email this list when a snapshot is available, just in case.
I'm not aware of anyone else actively working on it for NetBSD
at the moment (you sent me an older snapshot, but I never got
around to playing around with it). I'm certainly interested
in integrating your code once it's ready.
- Frank
--
Frank van der Linden fvdl@wasabisystems.com
======================================================================
Quality NetBSD CDs, Support & Service. http://www.wasabisystems.com/