Re: [PATCH 5/5] kernfs: add exportfs operations

From: Tejun Heo
Date: Wed May 24 2017 - 13:46:17 EST


Hello, Christoph.

On Wed, May 24, 2017 at 10:41:38AM -0700, Christoph Hellwig wrote:
> > But how do you map that back to the cgroup without scanning the cgroup
> > hierarchy?
>
> I'm totally lost on why you would do that. So maybe you just need
> to send the full patch so that reviewers get the full picture.

Here's a simple scenario. Let's say blktrace now exposes the cgroup
inode and generation numbers per trace. Userland tool now wants to
show that in a human readable format but it can only map back the
inode and generation numbers to the path by scanning the cgroup tree.
So, the goal is having a token which is not path which uniquely
identifies a cgroup and the ability to map that back to cgroup path.
We can add a dedicated interface to cgroup root, for example, and
allow querying by echoing inode and generation numbers into it but
that's kinda clumsy.

Thanks.

--
tejun