Subject: Re: Exports list management, take 3
To: None <tech-kern@netbsd.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-kern
Date: 09/18/2005 00:36:15
On 9/17/05, Julio M. Merino Vidal <jmmv84@gmail.com> wrote:
[...]
> - Change the mount_* commands to not deal with NFS stuff; done
>   internally by the kernel when initializing the NFS support for each
>   file system.

Just to let you know: I've just done some further improvements and
updated the patch.  Basically, I tried to push more NFS specific details
into nfs/ rather than leaving them in kern/ intermixed with unrelated
stuff (and adding bloat even when the kernel is built without NFS
server support).

That is:
- Avoid defining a netexport field in 'struct mount'.  Instead, keep a
  mount<->netexport map in the NFS code that can be accessed to do
  the conversion.
- Drop the 'features' flags so that file systems do not need to tell the
  upper layer about their "NFS support" (which in fact is not "real" in
  the sense that there is no such thing in file systems).  Assume that
  a file system is NFS exportable if its vfs_vptofh and vfs_fhtovp
  operations are not NULL.  (Otherwise return EOPNOTSUPP where
  appropriate.)  As a side effect, many file systems will see their size
  reduced, as the stubs for these two functions will go away.
- Move netcred and netexport structures into nfs' code, instead of
  having them in mount.h.  (They don't even need to be in a header
  file now.)

I have the feeling that, after all these changes, we will see a reduction
in kernel size (specially when !NFSSERVER), and maybe also in other
situations :-)

--=20
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/