Subject: RE: Interface to change NFS exports
To: Frank van der Linden <jmmv84@gmail.com>
From: Gordon Waidhofer <gww@traakan.com>
List: tech-kern
Date: 09/11/2005 09:00:30
> -----Original Message-----
> From: tech-kern-owner@NetBSD.org [mailto:tech-kern-owner@NetBSD.org]On
> Behalf Of Frank van der Linden
> Sent: Sunday, September 11, 2005 5:47 AM
> To: jmmv84@gmail.com
> Cc: tech-kern@netbsd.org
> Subject: Re: Interface to change NFS exports
> 
> 
> Julio M. Merino Vidal wrote:
> 
> >Hi everybody,
> >
> >while adding NFS support to tmpfs, I found that the current way to
> >change NFS export information is... how could I say it... very ugly.
> >It seems to be a bandaid over what was used in the past to mount
> >FFS systems, which makes it confusing and difficult to extend.
> >(Don't we aim for clean design? ;-)
> >  
> >
> Hi Julio,
> 
> I agree with most of these changes, but I'd like to see an additional 
> change: overloading the mount system call with export functionality is 
> just wrong. There should be a seperate exportfs system call.
> 
> - Frank

I wholly concur with Julio's observations and with Frank's
suggestion.

The warts on mountd(8) alone is motivation enough.
I also had to struggle with that one. It's nearly pointless to
have kernel load modules for file systems when mountd(8) has to
tweaked by hand. It wouldn't be possible to source file system
modules from multiple sources because the end user would have
to tweak mountd(8) source code. Most end users don't want to
do that.

Perhaps something like an fsctl() would be a good approach.
Quotactl() is very close. Things like quotactl() could be
folded into an fsctl(). Changing between r/w and r/o would
be really easy. Freezing/unfreezing would too which is needed
for LVM-based snapshots and in certain replication scenarios.

Regards,
	-gww