[Lxc-users] unmounting cgroup partition
Serge Hallyn
serge.hallyn at ubuntu.com
Sat Apr 13 17:18:38 UTC 2013
Quoting David Shwatrz (dshwatrz at gmail.com):
> Hello,
>
> When I perform the next sequence it finishes ok:
> mkdir /cgroup/freezer
> mount -t cgroup -o freezer testf /cgroup/freezer/
> umount /cgroup/freezer
>
> I had also added printk in the cgroup unmount handler ,
> cgroup_kill_sb(), immediately in the
> beginning of the method, and we reach it (kernel/cgroup.c)
>
> Now I try the following sequence:
> mkdir /cgroup/freezer
> mount -t cgroup -o freezer testf /cgroup/freezer/
> mkdir /cgroup/freezer/0
> umount /cgroup/freezer
>
> We do **not** reach the cgroup_kill_sb()! But there is no error
> message; moreover, mount | grep freezer returns nothing.
> ls -al /cgroup/freezer/ also returns noting
>
>
> Now, at this point in running the sequences above, running
> mount -t cgroup -o freezer testf /cgroup/freezer
> and ls /cgroup/freezer
> shows folder "0".
>
> Now:
> running rmdir /cgroup/freezer/0
> and
> umount /cgroup/freezer
> *does* reach the cgroup unmount handler , cgroup_kill_sb(),.
>
> Should we permit unmount if groups still exist under some cgroup topmost root ?
Yes.
-serge
More information about the lxc-users
mailing list