From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Waychison Subject: Re: [RFC] shared subtrees Date: Mon, 17 Jan 2005 13:31:02 -0500 Message-ID: <41EC0466.9010509@sun.com> References: <20050113221851.GI26051@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Return-path: Received: from brmea-mail-3.Sun.COM ([192.18.98.34]:4763 "EHLO brmea-mail-3.sun.com") by vger.kernel.org with ESMTP id S262612AbVAQSbf (ORCPT ); Mon, 17 Jan 2005 13:31:35 -0500 Received: from phys-mpk-1 ([129.146.11.81]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id j0HIVGVw004473 for ; Mon, 17 Jan 2005 11:31:16 -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 <0IAH003014JR8U@mpk-mail1.sfbay.sun.com> (original mail from Michael.Waychison@Sun.COM) for linux-fsdevel@vger.kernel.org; Mon, 17 Jan 2005 10:31:16 -0800 (PST) In-reply-to: <20050113221851.GI26051@parcelfarce.linux.theplanet.co.uk> To: Al Viro Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Al Viro wrote: > 3. bind > > bind works almost identically to mount; new vfsmount is created for every > place that gets propagation from mountpoint and propagation is set up to > mirror that between the mountpoints. However, there is a difference: unlike > the case of mount, vfsmount we were going to attach (say it, A) has some > history - it was created as a copy of some pre-existing vfsmount V. And > that's where the things get interesting: > * if V is contained in some p-node p, A is placed into the same > p-node. That may require merging one of the p-nodes we'd just created > with p (that will be the counterpart of the p-node containing the mountpoint). > * if V is owned by some p-node p, then A (or p-node containing A) > becomes owned by p. > Corner case: how do we handle the case where: mount --make-shared /foo mount --bind /foo /foo/bar A nested --bind without sharing makes sense, but doesn't when sharing is enabled (infinite loop). How about a rule that states that for all Ai,Aj in p-node p, Ai must not parent Aj in the vfsmount tree. This can be enforced at graft time. - -- 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 iD8DBQFB7ARmdQs4kOxk3/MRAjkjAKCEBWx7iOWhTu1EOR2ABMr5abW4RgCdGlMu u/Isw16fgZaErR3BErWq3JI= =mJnu -----END PGP SIGNATURE-----