From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: [PATCH] private mounts Date: Sat, 30 Apr 2005 10:42:18 +0100 Message-ID: <20050430094218.GA32679@mail.shareable.org> References: <20050424205422.GK13052@parcelfarce.linux.theplanet.co.uk> <20050424210616.GM13052@parcelfarce.linux.theplanet.co.uk> <20050424211942.GN13052@parcelfarce.linux.theplanet.co.uk> <20050425071047.GA13975@vagabond> <20050430083516.GC23253@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hch@infradead.org, bulb@ucw.cz, viro@parcelfarce.linux.theplanet.co.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@osdl.org Return-path: Received: from mail.shareable.org ([81.29.64.88]:37035 "EHLO mail.shareable.org") by vger.kernel.org with ESMTP id S261174AbVD3JnN (ORCPT ); Sat, 30 Apr 2005 05:43:13 -0400 To: Miklos Szeredi Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Miklos Szeredi wrote: > > > How do you bind mount it from a different namespace? You _do_ need > > > bind mount, since a new mount might require password input, etc... > > > > Not nessecarily. The filesystem gets called into ->get_sb for every mount, > > and can then decided whether to return an existing superblock instance or > > setup a new one. If the credentials for the new mount match an old one > > it can just reuse it. (e.g. for block based filesystem it will always reuse > > right now) > > And if the credentials are checked in userspace (sshfs)? Well, if you can find a way to tell the userspace FUSE daemon to know that the mount is being done by the same user as the existing mount, you don't need (or want) to check the credentials - you want the FUSE daemon to tell the kernel code which superblock to reuse. This hack is a bit nasty - namespace per login, copying mounts from another login's namespace - but it would work. -- Jamie