From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ram Pai Subject: Re: [RFC PATCH 6/10] vfs: shared subtree aware move mounts Date: Tue, 20 Sep 2005 01:04:15 -0700 Message-ID: <1127203454.10061.34.camel@localhost> References: <20050916182620.GA28504@RAM> <20050920072755.GJ7992@ftp.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Miklos Szeredi , mike@waychison.com, bfields@fieldses.org, serue@us.ibm.com Return-path: Received: from e31.co.us.ibm.com ([32.97.110.129]:63675 "EHLO e31.co.us.ibm.com") by vger.kernel.org with ESMTP id S964919AbVITIET (ORCPT ); Tue, 20 Sep 2005 04:04:19 -0400 To: Al Viro In-Reply-To: <20050920072755.GJ7992@ftp.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2005-09-20 at 00:27, Al Viro wrote: > On Fri, Sep 16, 2005 at 11:26:20AM -0700, Ram wrote: > > Patch that help move a mount tree to a different mountpoint. The tree can > > contain any combination of shared/slave/private/unclonable mounts. > > OK, that answers the question about MS_MOVE... Please, add brute-force > "we don't allow it other than in trivial case" *before* the previous > patch, replacing it with the right thing here. > > BTW, I suspect that a look at operations on ->mnt_list and friends you > have in the entire thing would bring several inlined helpers covering > most of the instances; there's definitely too much raw list_add(), etc. > instances in the current code. ok. > > > +/* > > + * return 1 if the mount tree contains a unclonable mount > > + */ > > +static inline int tree_contains_unclone(struct vfsmount *mnt) > > +{ > > + struct vfsmount *p; > > + for (p = mnt; p; p = next_mnt(p, mnt)) { > > + if (IS_MNT_UNCLONABLE(p)) > > + return 1; > > + } > > + return 0; > > +} > > FWIW, such helpers should probably go in the same place where you > introduce unclonable - they won't complicate earlier patch and will > be in place there and they won't clutter this one anymore. ok and thanks for all the comments! Very much appreciate it!! Will have all the comments incorporated and ready for --mm tree by this week-end, RP