From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932892AbdBHByd (ORCPT ); Tue, 7 Feb 2017 20:54:33 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:58393 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932644AbdBHByb (ORCPT ); Tue, 7 Feb 2017 20:54:31 -0500 Date: Tue, 7 Feb 2017 17:54:23 -0800 From: Josh Triplett To: Christoph Hellwig Cc: James Bottomley , Amir Goldstein , Djalal Harouni , Chris Mason , Theodore Tso , "Eric W. Biederman" , Andy Lutomirski , Seth Forshee , linux-fsdevel , linux-kernel , LSM List , Dongsu Park , David Herrmann , Miklos Szeredi , Alban Crequy , Al Viro , "Serge E. Hallyn" , Phil Estes Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount Message-ID: <20170208015423.GC23245@cloud> References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <20170207091924.GA13995@infradead.org> <1486485440.2488.15.camel@HansenPartnership.com> <20170207181040.GA18551@infradead.org> <1486494123.2488.56.camel@HansenPartnership.com> <20170207194933.GB4393@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170207194933.GB4393@infradead.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 07, 2017 at 11:49:33AM -0800, Christoph Hellwig wrote: > On Tue, Feb 07, 2017 at 11:02:03AM -0800, James Bottomley wrote: > > > Another option would be to require something like a project as used > > > for project quotas as the root. This would also be conveniant as it > > > could storge the used remapping tables. > > > > So this would be like the current project quota except set on a > > subtree? I could see it being done that way but I don't see what > > advantage it has over using flags in the subtree itself (the mapping is > > known based on the mount namespace, so there's really only a single bit > > of information to store). > > projects (which are the underling concept for project quotas) are > per-subtree in practice - the flag is set on an inode and then > all directories and files underneath inherit the project ID, > hardlinking outside a project is prohinited. I'm interested in having a VFS-level way to do more than just a shift; I'd like to be able to arbitrarily remap IDs between what's on disk and the system IDs. If we're talking about developing a VFS-level solution for this, I'd like to avoid limiting it to just a shift. (A shift/range would definitely be the simplest solution for many common container cases, but not all.)