Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbcDZK3a (ORCPT ); Tue, 26 Apr 2016 06:29:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32963 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbcDZK32 (ORCPT ); Tue, 26 Apr 2016 06:29:28 -0400 Date: Tue, 26 Apr 2016 12:29:25 +0200 From: Karel Zak To: "Serge E. Hallyn" Cc: "Eric W. Biederman" , "Serge E. Hallyn" , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, containers@lists.linux-foundation.org, hannes@cmpxchg.org, gregkh@linuxfoundation.org, tj@kernel.org, cgroups@vger.kernel.org, akpm@linux-foundation.org Subject: Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup Message-ID: <20160426102925.vkydkjtrsnibuc7c@ws.net.home> References: <1460923472-29370-1-git-send-email-serge.hallyn@ubuntu.com> <1460923472-29370-3-git-send-email-serge.hallyn@ubuntu.com> <20160418041126.GA424@mail.hallyn.com> <87mvoqqu48.fsf@x220.int.ebiederm.org> <20160419014419.GA19080@mail.hallyn.com> <20160419040546.GA20350@mail.hallyn.com> <20160426024207.GA2783@mail.hallyn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160426024207.GA2783@mail.hallyn.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 26 Apr 2016 10:29:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 25 On Mon, Apr 25, 2016 at 09:42:07PM -0500, Serge E. Hallyn wrote: > > Looking at it another way... The value we're talking about shows us > > the path of the root dentry of a cgroup mount. If a task in cgns2 > > rooted at /a/b/c mounts a cgroupfs, it will see '/' as the root dentry. > > If a task in cgns1 rooted at /a/b looks at that mountinfo, '/' would > > be misleading. It really should be '/c'. > > So I think that for cgroup mount entries in mountinfo to be useful (i.e. > to criu) we either need the root dentry path to be given as relative to > the reader's cgroup namespace (as I have it in this patchset), or else > we need to add another piece of information in the mountinfo entry, such > as the nsfd inode number of the cgroup namespace in which it was > mounted. In the ideal world there is no mountinfo file, but /proc/self/mountinfo// directory with individual files, so every subsystem and filesystem has absolute freedom to store there all relevant information. The result will be also lucky kernel that does not have to always generate entire huge mountinfo file for all mountpoins... etc. :-) Karel -- Karel Zak http://karelzak.blogspot.com