[Devel] Question for remount

KAMEZAWA Hiroyuki kamezawa.hiroyu at jp.fujitsu.com
Fri Feb 20 02:02:23 PST 2009


Followings are 3 stories of remount cgroup,

1. remount with devices.

 # mount -t cgroup none /cgroups -ocpuacct,release_agent=xxx
 # echo > /cgroups/release_agent #clear release agent by hand
 # mount -t cgroup none /cgroups -oremount,cpuacct
 # cat /cgroups/release_agent
   => release_agent is ""

2. remount without devices, mount command will read /proc/mounts and
   copies option.

 # mount -t cgroup none /cgroups -ocpuacct,release_agent=xxx
 # echo > /cgroups/release_agent      #clear release agent by hand
 # mount /cgroups -oremount,cpuacct   #don't specify device
 # cat /cgroups/release_agent
   => xxx

Hmm, release_agent is copied from /proc/mounts and release_agent revives.

3. remount without devices, mount command will read /proc/mounts
 # mount -t cgroup none /cgroups -ocpuacct,release_agent=xxx
 # mount /cgroups -oremount,cpuacct,release_agent=xxx
 => error
 "release_agent=" will be found twice and this returns -INVAL

maybe case "2" is not ideal, I think. (but it may not be bug.)

My point is following.

1. Documentation/cgroups/cgroup.txt says
   #mount -oremount,cpuset,ns /dev/cgroup
   But this should be
   #mount -tcgroup none /dev/cgroup -oremount,cpuset,ns

2. /proc/mounts information of release_agent should be updated....
   when it's overwritten directly.

3. If "2" is impossible, changing release_agent at remount should not be allowed.

How do you think ?

Thanks,
-Kame

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list