From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bedivere.hansenpartnership.com ([66.63.167.143]:59748 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922AbdBUAiW (ORCPT ); Mon, 20 Feb 2017 19:38:22 -0500 Message-ID: <1487637498.2337.42.camel@HansenPartnership.com> Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount From: James Bottomley To: Vivek Goyal 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 Date: Mon, 20 Feb 2017 16:38:18 -0800 In-Reply-To: <20170220192624.GC9464@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> <20170217203529.GC15841@redhat.com> <1487474678.15793.2.camel@HansenPartnership.com> <20170220192624.GC9464@redhat.com> 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-20 at 14:26 -0500, Vivek Goyal wrote: > On Sat, Feb 18, 2017 at 07:24:38PM -0800, James Bottomley wrote: > > [..] > > > > 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 > > > > That's rather complex, but the principle is simple: use the inode > > hash > > for all upper inodes that may have aliases. Aliasable means the > > underlying inode isn't a directory and has i_nlink > 1, so all I > > have > > to do is perform a lookup through the hash if the underlying is > > aliasable, invalidate the dentry in d_revalidate if the aliasing > > conditions to the underlying change and manually handle hard links > > and > > it should all work. > > > > Like this? > > Sounds reasonable to me. I did basic testing and this seems to work > for me. > > In general, I am having random crashes. I just get following on > serial console > > ------[Cut Here]---------- > > And nothing after that. That's indicative of some hard lockup. I don't see this, but I'm also using a second laptop for testing, which is suboptimal. I'm going to try moving to xfstests inside a VM tomorrow (that's what long aeroplane flights are for). > Still trying to narrow down. Thanks. There've been a lot of patches flying around, so I'll do a collected repost under a v2 header to make sure we're all in sync. James