From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:52478 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934090AbdBQUfb (ORCPT ); Fri, 17 Feb 2017 15:35:31 -0500 Date: Fri, 17 Feb 2017 15:35:29 -0500 From: Vivek Goyal To: James Bottomley Cc: Al Viro , Djalal Harouni , Chris Mason , Theodore Tso , 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 , "Serge E. Hallyn" , Phil Estes Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount Message-ID: <20170217203529.GC15841@redhat.com> References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <20170215203441.GA22585@redhat.com> <1487260590.2944.21.camel@HansenPartnership.com> <20170217025516.GD29622@ZenIV.linux.org.uk> <1487352847.4351.23.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487352847.4351.23.camel@HansenPartnership.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Feb 17, 2017 at 09:34:07AM -0800, James Bottomley wrote: > On Fri, 2017-02-17 at 02:55 +0000, Al Viro wrote: > > On Thu, Feb 16, 2017 at 07:56:30AM -0800, James Bottomley wrote: > > > > > > Hi James, > > > > > > > > Should it be "return d_splice_alias()" so that if we find an > > > > alias it is returned back to caller and passed in dentry can be > > > > freed. Though I don't know in what cases alias can be found. And > > > > if alias is found how do we make sure alias_dentry->d_fsdata is > > > > pointing to new (real dentry). > > > > > > It probably should be for the sake of the pattern. In our case I > > > don't think we can have any root aliases because the root dentry is > > > always pinned in the cache, so cache lookup should always find it. > > > > What does that have to do with root dentry? The real reason why that > > code works (FVerySVO) is that the damn thing allocates a new inode > > every time. Including the hardlinks, BTW. > > Yes, this is a known characteristic of stacked filesystems. Is there > some magic I don't know about that would make it easier to reflect hard > links as aliases? I think overlayfs had the same issue in the beginning and miklos fixed it. commit 51f7e52dc943468c6929fa0a82d4afac3c8e9636 Author: Miklos Szeredi Date: Fri Jul 29 12:05:24 2016 +0200 ovl: share inode for hard link Vivek