[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101001004438.GJ9247@ram-laptop>
Date: Thu, 30 Sep 2010 17:44:38 -0700
From: Ram Pai <linuxram@...ibm.com>
To: Valerie Aurora <vaurora@...hat.com>
Cc: Ram Pai <ram.n.pai@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Miklos Szeredi <miklos@...redi.hu>,
Christoph Hellwig <hch@...radead.org>,
Andreas Gruenbacher <agruen@...e.de>,
Nick Piggin <npiggin@...nel.dk>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 03/34] VFS: Add CL_NO_SLAVE flag to
clone_mnt()/copy_tree()
On Mon, Sep 27, 2010 at 02:50:17PM -0400, Valerie Aurora wrote:
> On Sun, Sep 26, 2010 at 10:42:05PM -0700, Ram Pai wrote:
> > On Mon, Sep 20, 2010 at 08:03:44PM -0400, Valerie Aurora wrote:
> > > On Sun, Sep 19, 2010 at 10:25:53PM -0700, Ram Pai wrote:
> > > >
> > > > I understand your intentions, but I think you are making a wrong assumption.
> > > > You seem to be thinking that if a slave-mount is cloned, the new cloned
> > > > mount will also be a slave-mount and will hence receive propagations. As
> > > > per shared subtree semantics, a slave-mount when cloned will create a private
> > > > mount. Since your intention is to avoid generating any new mounts that
> > > > recieve propagations, you should be checking for shared-mounts and
> > > > slave-shared-mounts because these are the two kind of mounts that when
> > > > cloned create new mounts that receive propagation.
> > >
> > > No. This isn't about the semantics of the clone mount operation. It
> > > is about the administrator creating a slave mount, unioning it, and
> > > then being surprised when the unioned file system does not receive
> > > mount propagation events.
> > >
> > > Think of the source vfsmount tree as a set of command line arguments
> > > for the union mount.
> >
> > Ok. In that case, you introduced a subtle change in the semantics of clone_mnt().
> > As I understand it, the flags parameter of clone_mnt() are meant to be a modifier
> > for the cloned mount, not a filter on the source mount.
>
> Yes, that's it exactly.
>
> Do you have a suggestion for writing this a different way? We can
> move it all into copy_tree() and leave clone_mnt() alone, at the cost
> of a little code duplication and some acrobatics around possible
> loopback support.
I would probably lean towards a function tree_receives_propagation() similar to
tree_contains_unbindable(), where you walk down the tree and check if there
are any SLAVE or SHARED mounts.
RP
>
> -VAL
--
Ram Pai
System X Device-Driver Enablement Lead
Linux Technology Center
Beaverton OR-97006
503-5783752 t/l 7753752
linuxram@...ibm.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists