Re: [PATCH] private mounts

Miklos Szeredi
2005-05-11T10:43:27Z

> > > > > I can't write a script that reads your mind. But I sure can
> > > > > write a script that finds out what you mounted in the other
> > > > > shells (with help of a little wrapper around the mount
> > > > > command).
> > > >
> > > > How do you bind mount it from a different namespace? You _do_
> > > > need bind mount, since a new mount might require password
> > > > input, etc...
> > >
> > > Not nessecarily. The filesystem gets called into ->get_sb for
> > > every mount, and can then decided whether to return an existing
> > > superblock instance or setup a new one. If the credentials for
> > > the new mount match an old one it can just reuse it. (e.g. for
> > > block based filesystem it will always reuse right now)
> >
> > And if the credentials are checked in userspace (sshfs)?
>
> The it needs to call to userspace in ->get_sb..

That's clear.

What I don't get is what's the point in adding complexity to the
kernel and userspace programs, when it can be done without _any_
changes, just by doing a bind mount.

It's not just calling ->get_sb. It's finding the right filesystem
daemon, that has been started with the exact same command line
arguments, environment etc.

It's just not practical.

Miklos