From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Waychison Subject: Re: [RFC] shared subtrees Date: Mon, 17 Jan 2005 15:11:18 -0500 Message-ID: <41EC1BE6.1030506@sun.com> References: <20050113221851.GI26051@parcelfarce.linux.theplanet.co.uk> <41EC0466.9010509@sun.com> <20050117190028.GF24830@fieldses.org> <41EC1253.8080902@sun.com> <20050117193206.GH24830@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: Received: from brmea-mail-4.Sun.COM ([192.18.98.36]:21234 "EHLO brmea-mail-4.sun.com") by vger.kernel.org with ESMTP id S262866AbVAQULn (ORCPT ); Mon, 17 Jan 2005 15:11:43 -0500 Received: from phys-mpk-1 ([129.146.11.81]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j0HKBcdx001975 for ; Mon, 17 Jan 2005 13:11:38 -0700 (MST) Received: from conversion-daemon.mpk-mail1.sfbay.sun.com by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IAH006019ERJG@mpk-mail1.sfbay.sun.com> (original mail from Michael.Waychison@Sun.COM) for linux-fsdevel@vger.kernel.org; Mon, 17 Jan 2005 12:11:38 -0800 (PST) In-reply-to: <20050117193206.GH24830@fieldses.org> To: "J. Bruce Fields" Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 J. Bruce Fields wrote: > On Mon, Jan 17, 2005 at 02:30:27PM -0500, Mike Waychison wrote: > >>Well, if I understand it correctly: >> >>(assuming /foo is vfsmount A) >> >>$> mount --make-shared /foo >> >>will make A->A >> >>$> mount --bind /foo /foo/bar >> >>will create a vfsmount B based off A, but because A is in a p-node, >>A->B, B->A. >> >>Then, we attach B to A in the vfsmount tree, but because A->B in the >>propagation tree, B also gets a vfsmount C added on dentry 'bar'. >>Recurse ad infinitum. >> >>Make sense? > > > Yes, but couldn't the whole thing be avoided if we just agreed that the > propagation wasn't set up till after B was attached to A? I don't think that solves the problem. B should receive copies (with shared semantics if called for) of all mountpoints C1,..,Cn that are children of A if A->A. This is regardless of whether or not propagation occurs before or after the attach. Allowing this is like allowing directory aliasing in the sense that an aliased directory that is nested within itself opens us to badness/headaches 8) I still think the only way to handle this is to disallow vfsmounts in a p-node to have (grand)parent-child relationships. This may have to be extended to the 'owned by' case as well. - -- Mike Waychison Sun Microsystems, Inc. 1 (650) 352-5299 voice 1 (416) 202-8336 voice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB7BvmdQs4kOxk3/MRAkDnAJ0SgZ4KJJXu5gHpCAmgZY199ts3sgCeKFoD qpQqB+hkExDyuGLOfG8Hnso= =H4nE -----END PGP SIGNATURE-----