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

2016-05-02 Thread Tejun Heo
On Tue, Apr 26, 2016 at 09:36:23AM -0500, Serge E. Hallyn wrote: > > 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

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

2016-05-02 Thread Tejun Heo
On Tue, Apr 26, 2016 at 09:36:23AM -0500, Serge E. Hallyn wrote: > > 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

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

2016-05-02 Thread Tejun Heo
Hello, On Sun, Apr 17, 2016 at 03:04:32PM -0500, serge.hal...@ubuntu.com wrote: > +static int cgroup_show_path(struct seq_file *sf, struct kernfs_node *kf_node, > + struct kernfs_root *kf_root) > +{ > + int len = 0, ret = 0; > + char *buf = NULL; > + struct

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

2016-05-02 Thread Tejun Heo
Hello, On Sun, Apr 17, 2016 at 03:04:32PM -0500, serge.hal...@ubuntu.com wrote: > +static int cgroup_show_path(struct seq_file *sf, struct kernfs_node *kf_node, > + struct kernfs_root *kf_root) > +{ > + int len = 0, ret = 0; > + char *buf = NULL; > + struct

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

2016-04-26 Thread Serge E. Hallyn
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

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

2016-04-26 Thread Serge E. Hallyn
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

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

2016-04-26 Thread Karel Zak
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

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

2016-04-26 Thread Karel Zak
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

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

2016-04-25 Thread Serge E. Hallyn
Quoting Serge E. Hallyn (se...@hallyn.com): > Quoting Serge E. Hallyn (se...@hallyn.com): > > Quoting Eric W. Biederman (ebied...@xmission.com): > > > "Serge E. Hallyn" writes: > > > > > > >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c > > > >> index 671dc05..9a0d7b3

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

2016-04-25 Thread Serge E. Hallyn
Quoting Serge E. Hallyn (se...@hallyn.com): > Quoting Serge E. Hallyn (se...@hallyn.com): > > Quoting Eric W. Biederman (ebied...@xmission.com): > > > "Serge E. Hallyn" writes: > > > > > > >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c > > > >> index 671dc05..9a0d7b3 100644 > > > >> ---

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

2016-04-18 Thread Serge E. Hallyn
Quoting Serge E. Hallyn (se...@hallyn.com): > Quoting Eric W. Biederman (ebied...@xmission.com): > > "Serge E. Hallyn" writes: > > > > >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c > > >> index 671dc05..9a0d7b3 100644 > > >> --- a/kernel/cgroup.c > > >> +++

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

2016-04-18 Thread Serge E. Hallyn
Quoting Serge E. Hallyn (se...@hallyn.com): > Quoting Eric W. Biederman (ebied...@xmission.com): > > "Serge E. Hallyn" writes: > > > > >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c > > >> index 671dc05..9a0d7b3 100644 > > >> --- a/kernel/cgroup.c > > >> +++ b/kernel/cgroup.c > > >> @@

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

2016-04-18 Thread Serge E. Hallyn
Quoting Eric W. Biederman (ebied...@xmission.com): > "Serge E. Hallyn" writes: > > >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c > >> index 671dc05..9a0d7b3 100644 > >> --- a/kernel/cgroup.c > >> +++ b/kernel/cgroup.c > >> @@ -1593,6 +1593,40 @@ static int

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

2016-04-18 Thread Serge E. Hallyn
Quoting Eric W. Biederman (ebied...@xmission.com): > "Serge E. Hallyn" writes: > > >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c > >> index 671dc05..9a0d7b3 100644 > >> --- a/kernel/cgroup.c > >> +++ b/kernel/cgroup.c > >> @@ -1593,6 +1593,40 @@ static int rebind_subsystems(struct

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

2016-04-18 Thread Eric W. Biederman
"Serge E. Hallyn" writes: >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c >> index 671dc05..9a0d7b3 100644 >> --- a/kernel/cgroup.c >> +++ b/kernel/cgroup.c >> @@ -1593,6 +1593,40 @@ static int rebind_subsystems(struct cgroup_root >> *dst_root, u16 ss_mask) >>

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

2016-04-18 Thread Eric W. Biederman
"Serge E. Hallyn" writes: >> diff --git a/kernel/cgroup.c b/kernel/cgroup.c >> index 671dc05..9a0d7b3 100644 >> --- a/kernel/cgroup.c >> +++ b/kernel/cgroup.c >> @@ -1593,6 +1593,40 @@ static int rebind_subsystems(struct cgroup_root >> *dst_root, u16 ss_mask) >> return 0; >> } >> >>

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

2016-04-17 Thread Serge E. Hallyn
On Sun, Apr 17, 2016 at 03:04:32PM -0500, serge.hal...@ubuntu.com wrote: > From: Serge Hallyn > > When showing a cgroupfs entry in mountinfo, show the > path of the mount root dentry relative to the reader's > cgroup namespace root. > > Signed-off-by: Serge Hallyn

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

2016-04-17 Thread Serge E. Hallyn
On Sun, Apr 17, 2016 at 03:04:32PM -0500, serge.hal...@ubuntu.com wrote: > From: Serge Hallyn > > When showing a cgroupfs entry in mountinfo, show the > path of the mount root dentry relative to the reader's > cgroup namespace root. > > Signed-off-by: Serge Hallyn > --- > fs/kernfs/mount.c

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

2016-04-17 Thread serge . hallyn
From: Serge Hallyn When showing a cgroupfs entry in mountinfo, show the path of the mount root dentry relative to the reader's cgroup namespace root. Signed-off-by: Serge Hallyn --- fs/kernfs/mount.c | 14 ++

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

2016-04-17 Thread serge . hallyn
From: Serge Hallyn When showing a cgroupfs entry in mountinfo, show the path of the mount root dentry relative to the reader's cgroup namespace root. Signed-off-by: Serge Hallyn --- fs/kernfs/mount.c | 14 ++ include/linux/kernfs.h | 2 ++ kernel/cgroup.c| 35