On Tue, Oct 08, 2013 at 02:01:17PM +0200, Joerg Schilling wrote:
> Pawel Jakub Dawidek <[email protected]> wrote:
> 
> > In my opinion automouting snapshots under .zfs/ is a bit of a hack.
> > There are some obvious problems with it:
> > - Snapshots are not unmounted automatically.
> > - Unprivileged users can trigger file system mount which leads to a bit
> >   of hacking around in the kernel (as we can't use current context
> >   credentials).
> > - NFS exports. Nobody wants to NFS mount every single snapshot on the
> >   client and exporting file system and its snapshot as one export can
> >   lead to inode collisions.
> >
> > Having snapshots to be handled within ZFS more natively, ie. as integral
> > part of the file system content and not separate mountpoints would make
> > it much more intuitive and user-friendly. Not sure about implementation
> > complexity.
> 
> Are you talking about FreeBSD problems?
> 
> Note that if you don't mount snapshots as separate items with separate file 
> system ids (st_dev), you will violate POSIX filesystem semantics.

When we export file system and its snapshot as one NFS export we do
violate this as collision is possible.

I was hoping we could split 64bit inode number and use its top part to
store snapshot identifier to avoid collisions, but 64 bits are not that
much.

> BTW: What is the problem with mounting from inside the kernel?

Received: from [91.121.88.72] (helo=mail.dawidek.net)
        by node002.open-zfs.net
        with esmtp (HybridCluster distributed mail proxy)
        (envelope-from <[email protected]>); Tue, 08 Oct 2013 13:12:37 -0000
We have to use some global root credentials to mount the snapshot or
credentials of the user that who the mount (in case of delegated
administration). Not the credentials of the user who triggered snapshot
mount. It gets even messier when the process triggering the mount is
chrooted, etc. Separate set of issues I had with NFS, which didn't use
VFS_LOOKUP() in some places (file handle->vnode method was used), so
mounting wasn't happening. I remember changing that to use VFS_LOOKUP().

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://mobter.com

Attachment: pgpb3jvIP5bTa.pgp
Description: PGP signature

_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to