From mboxrd@z Thu Jan 1 00:00:00 1970 From: viro@parcelfarce.linux.theplanet.co.uk Subject: Re: [some sanity for a change] possible design issues for hybrids Date: Thu, 26 Aug 2004 23:53:08 +0100 Sender: Message-ID: <20040826225308.GC21964@parcelfarce.linux.theplanet.co.uk> References: <200408262128.41326.vda@port.imtp.ilyichevsk.odessa.ua> <20040826191323.GY21964@parcelfarce.linux.theplanet.co.uk> <20040826203228.GZ21964@parcelfarce.linux.theplanet.co.uk> <20040826212853.GA21964@parcelfarce.linux.theplanet.co.uk> <20040826223625.GB21964@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Denis Vlasenko , Rik van Riel , Diego Calleja , jamie@shareable.org, christophe@saout.de, christer@weinigel.se, spam@tnonline.net, akpm@osdl.org, wichert@wiggy.net, jra@samba.org, reiser@namesys.com, hch@lst.de, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, flx@namesys.com, reiserfs-list@namesys.com Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com To: Linus Torvalds Content-Disposition: inline In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org On Thu, Aug 26, 2004 at 03:45:09PM -0700, Linus Torvalds wrote: > No, lookup would just return the dentry, but the dentry would already be > filled in with the mount-point information. > > And you can do that with a simple vfs helper function, ie the filesystem > itself would just need to do > > pseudo_mount(dentry, inode); > > thing - which just fills in dentry->d_mountpoint with a new vfsmount > thing. It would allocate a new root dentry (for the pseudo-mount) and a > new vfsmount, and make dentry->d_mountpoint point to it. What dentry->d_mountpoint? No such thing... Note that we can't get vfsmount by dentry - that's the point of having these guys in the first place. So I'm not sure what you are trying to do here - dentry + inode is definitely not enough to attach any vfsmounts anywhere. That's not about namespaces - same fs mounted in several places will give the same problem - one dentry, many vfsmounts. And we obviously *can't* have one vfsmount for all of them - if the same fs is mounted on /foo and /bar, we will have the same dentry for /foo/splat and /bar/splat. So what should we get for /foo/splat/. and /bar/splat/.? Same dentry *and* same vfsmount? I'd expect .. from the former to give /foo and from the latter - /bar...