Re: [PATCH] fs: Restore files_lock and set_fs_root exports

From: Al Viro
Date: Thu Jan 06 2005 - 20:25:52 EST


On Thu, Jan 06, 2005 at 05:01:19PM -0800, Paul E. McKenney wrote:
> Thank you for the pointer! By this, you mean do mount operations in
> conjunction with namespaces, right?

Namespaces or chroots, not much difference... The point is that you want
to duplicate the mount tree with your stuff added at some point. Instead
of doing duplication on directory tree level (i.e. having your fs code
try and mirror the stuff from other filesystems), you can do that completely
outside of fs code; either by cloning the namespace first or by building
a chroot jail with mount --rbind / <location of jail> and chrooting in
there. Then just mount the stuff that really comes from your data at
whatever place you want.

> I will follow up with more detail as I learn more. The current issue
> seems to be with removeable devices. Their users want to be accessing
> a particular version, but still see a memory stick that was subsequently
> mounted outside of the view. Straightforward use of mounts and namespaces
> would prevent the memory stick from being visible to users that were
> already in view.

There is a way to deal with that and since 2.7 is not going to materialize,
we'd better go and resurrect that project in 2.6... Basically, having
shared and asymmetrically shared subtrees between namespaces/locations
in the same namespace.

I'll try to get the detailed description of that stuff (partial sharing)
written down in a couple of days and post an RFC on l-k and fsdevel.

It's doable, it's not particulary scary, but it sure as hell *far* easier
to do in generic code; there we have access to vfsmount trees and there
lives all code that modifies them, so we don't have to screw with mirroring
directory trees of other filesystems.

Note that even now you can simply go ahead and mount that stick inside
of view explicitly. That will work; the question is how to make it automatic
and do that in a sane way.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/