From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754608AbdBFQYo (ORCPT ); Mon, 6 Feb 2017 11:24:44 -0500 Received: from mail01-md.ns.itscom.net ([175.177.155.111]:35536 "EHLO mail01-md.ns.itscom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753532AbdBFQYk (ORCPT ); Mon, 6 Feb 2017 11:24:40 -0500 From: "J. R. Okajima" Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount To: James Bottomley Cc: 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 , Al Viro , "Serge E. Hallyn" , Phil Estes In-Reply-To: <1486363583.2496.63.camel@HansenPartnership.com> References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <4608.1486351540@jrobl> <1486363583.2496.63.camel@HansenPartnership.com> Date: Tue, 07 Feb 2017 01:24:37 +0900 Message-ID: <23764.1486398277@jrobl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org James Bottomley: > 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. I think it serious. Reusing the backend fs' inum is a good approach which Amir wrote. Based on this, I'd suggest you to support the hardlinks. bakend_dentry = lookup_one_len() if (d_inode->i_nlink != 1) shiftfs_inode = ilookup(); if (!shiftfs_inode) { shiftfs_inode = new_inode(); shiftfs_inode->i_ino = bakend_dentry->d_inode->i_ino; } J. R. Okajima