Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1387538

Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup

From "Serge E. Hallyn" <serge@hallyn.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup
Date 2016-04-26 16:40 +0200
Message-ID <rscjD-TC-1@gated-at.bofh.it> (permalink)
References (3 earlier) <rpsEi-76t-7@gated-at.bofh.it> <rpsXE-7eq-7@gated-at.bofh.it> <rpv98-Kc-15@gated-at.bofh.it> <rs1ey-8m7-9@gated-at.bofh.it> <rs8pI-5ZZ-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Apr 26, 2016 at 12:29:25PM +0200, Karel Zak wrote:
> 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/<id>/
> 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. :-)

Yeah mountinfo does seem like a big stick to swing around every time I want
one little piece of information.  Also mght be good to have per-fstype
directories so we can just look under /proc/self/mountsdir/cgroupfs/ for
only cgroupfs <id>s.

There we might also find open fds for source and mountdir, kinda fitting
in with previous discussions of separating bdev_open() and mountat().

BTW, assuming this would in fact report source and mountpoint location
with fds, these would really (through realpath) be reported relative to
the reader's namespace, as I'm doing and advocating here.

-serge

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup serge.hallyn@ubuntu.com - 2016-04-17 22:10 +0200
  Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup "Serge E. Hallyn" <serge.hallyn@ubuntu.com> - 2016-04-18 06:20 +0200
    [PATCH 3/2] cgroup_show_path: use a new helper to get current cgns  css_set "Serge E. Hallyn" <serge@hallyn.com> - 2016-04-18 07:30 +0200
    Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup ebiederm@xmission.com (Eric W. Biederman) - 2016-04-19 03:30 +0200
      Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup "Serge E. Hallyn" <serge@hallyn.com> - 2016-04-19 03:50 +0200
        Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup "Serge E. Hallyn" <serge@hallyn.com> - 2016-04-19 06:10 +0200
          Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup "Serge E. Hallyn" <serge@hallyn.com> - 2016-04-26 04:50 +0200
            Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup Karel Zak <kzak@redhat.com> - 2016-04-26 12:30 +0200
              Re: [PATCH 2/2] mountinfo: implement show_path for kernfs and cgroup "Serge E. Hallyn" <serge@hallyn.com> - 2016-04-26 16:40 +0200

csiph-web