From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bedivere.hansenpartnership.com ([66.63.167.143]:51146 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751606AbdBGAKQ (ORCPT ); Mon, 6 Feb 2017 19:10:16 -0500 Message-ID: <1486426211.2474.119.camel@HansenPartnership.com> Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount From: James Bottomley To: "J. Bruce Fields" Cc: Theodore Ts'o , "J. R. Okajima" , Djalal Harouni , Chris Mason , Josh Triplett , "Eric W. Biederman" , Andy Lutomirski , Seth Forshee , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Dongsu Park , David Herrmann , Miklos Szeredi , Alban Crequy , Al Viro , "Serge E. Hallyn" , Phil Estes Date: Mon, 06 Feb 2017 16:10:11 -0800 In-Reply-To: <20170206215233.GC19704@fieldses.org> References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <4608.1486351540@jrobl> <1486363583.2496.63.camel@HansenPartnership.com> <20170206145044.7xlm6l72kystp5zc@thunk.org> <1486394296.2474.49.camel@HansenPartnership.com> <20170206215233.GC19704@fieldses.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 2017-02-06 at 16:52 -0500, J. Bruce Fields wrote: > On Mon, Feb 06, 2017 at 07:18:16AM -0800, James Bottomley wrote: > > On Mon, 2017-02-06 at 09:50 -0500, Theodore Ts'o wrote: > > > On Sun, Feb 05, 2017 at 10:46:23PM -0800, James Bottomley wrote: > > > > Yes, I know the problem. However, I believe most current linux > > > > filesystems no longer guarantee stable, for the lifetime of the > > > > file, inode numbers. The usual docker container root is > > > > overlayfs, which, similarly doesn't support stable inode > > > > numbers. I see the odd complaint about docker with overlayfs > > > > having unstable inode numbers, but none seems to have any > > > > serious repercussions. > > > > > > Um, no. Most current linux file systems *do* guarantee stable > > > inode numbers. For one thing, NFS would break horribly if you > > > didn't have stable inode numbers. Never mind applications which > > > depend on POSIX semantics. And you wouldn't be able to save > > > games in rogue or nethack, either. :-) > > > > I believe that's why we have the superblock export operations to > > manufacture unique filehandles in the absence of inode number > > stability. > > Where did you hear that? > > I'd expect an NFS client to handle non-unique filehandles > better than non-unique inode numbers. I believe our client will -EIO > on encountering an inode number change (see > nfs_check_inode_attributes().) > > See also https://tools.ietf.org/html/rfc5661#section-10.3.4. Could you clarify your point a bit further, please? Both the check_inode_attributes() code and section 10.3.4 are talking about fileids, which are the things that are constructed in the export_ops ... admittedly a lot of fileid_types are based on inode numbers, but several aren't. For those that aren't, I believe NFS doesn't care about the underlying inode number of the exported file. James