Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1367522
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] cgroup namespaces: add a 'nsroot=' mountinfo field |
| Date | 2016-03-30 21:00 +0200 |
| Message-ID | <ritvs-1a3-15@gated-at.bofh.it> (permalink) |
| References | <rfhKa-4mP-27@gated-at.bofh.it> <rhQu6-77q-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello, Serge.
On Mon, Mar 28, 2016 at 08:12:03PM -0500, Serge E. Hallyn wrote:
> Quoting Serge E. Hallyn (serge@hallyn.com):
> > One practical problem I've found with cgroup namespaces is that there
> > is no way to disambiguate between a cgroupfs mount which was done in
> > a cgroup namespace, and a bind mount of a cgroupfs directory. So
> > whether I do
> >
> > unshare --cgroup -- bash -c "mount -t cgroup -o freezer f /mnt; cat /proc/self/mountinfo"
> >
> > or whether I just
> >
> > mount --bind /sys/fs/cgroup/freezer/$(awk -F: '/freezer/ { print $3 }' /proc/self/cgroup) /mnt
> >
> > 'mount root' field (field 3) in /proc/self/mountinfo will show the
> > same thing, the result of awk -F: '/freezer/ { print $3 }' /proc/self/cgroup.
> >
> > This patch adds a 'nsroot=' field to cgroup mountinfo entries, so that
> > userspace can distinguish a mount made in a cgroup namespace from a bind
> > mount from a cgroup subdirectory.
>
> no rush on the patch itself, I don't mind if i have to rewrite it from
> scratch, but I'd like to get the patch into docker/libcontainer using it,
> so can we decide on whether the syntax as shown here is ok?
Yeah, I think the syntax is fine.
Thanks.
--
tejun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] cgroup namespaces: add a 'nsroot=' mountinfo field "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-22 00:50 +0100
Re: [RFC PATCH] cgroup namespaces: add a 'nsroot=' mountinfo field "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-29 03:20 +0200
Re: [RFC PATCH] cgroup namespaces: add a 'nsroot=' mountinfo field Tejun Heo <tj@kernel.org> - 2016-03-30 21:00 +0200
Re: [RFC PATCH] cgroup namespaces: add a 'nsroot=' mountinfo field Tycho Andersen <tycho.andersen@canonical.com> - 2016-03-29 16:00 +0200
Re: [RFC PATCH] cgroup namespaces: add a 'nsroot=' mountinfo field "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-29 22:10 +0200
[PATCH] cgroup mount: ignore nsroot= "Serge E. Hallyn" <serge@hallyn.com> - 2016-03-30 19:30 +0200
Re: [PATCH] cgroup mount: ignore nsroot= Tycho Andersen <tycho.andersen@canonical.com> - 2016-03-30 20:10 +0200
csiph-web