Subject: Re: MNT_NOSHARE for non-exportable fs [was: Removing tmpfs' experimental status
To: YAMAMOTO Takashi <email@example.com>
From: M J Fleming <mjf@NetBSD.org>
Date: 10/25/2006 12:11:43
On Wed, Oct 25, 2006 at 11:23:06AM +0900, YAMAMOTO Takashi wrote:
> > Hi,
> > There is a patch in another mail that implements a "noshare" option for
> > filesystems.
> > This allows filesystems to declare that they do not want to be exported.
> > The code in kern/vfs_syscalls.c:sys_mount() is there for compatability reasons.
> > Example,
> > arkanian# mount -o noshare /dev/wd0e /mnt/1
> > Oct 24 17:10:04 arkanian mountd: "/mnt/1 -network 192.168.0.0 -mask
> > +255.255.255.0", line 2: Can't change attributes for /mnt/1 to 192.168.0.0:
> > +Operation not permitted
> > arkanian# mount | grep wd0e
> > /dev/wd0e on /mnt/1 type ntfs (noshare, local)
> > Thanks,
> > Matt
> - why "share" rather than "export"?
I chose "share" because "export" is too tightly coupled with NFS. However, I'm
sure my point of view can be swayed ;-)
> - what's the point to expose it as a mount option?
> sys_mount is not an appropriate interface to control nfs exportability
> these days. to specify filesystem characteristics,
> IMNT_ is more appropriate.
I'm exposing it as a mount option so that userland knows it's there. It's a
clear indicater of _why_ exporting doesn't work, "noshare" (or "noexport") can
be seen from the mount options.
> - you are committing too fast.
I apologise, I thought it was ok. I will wait longer in future.
> YAMAMOTO Takashi