public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Question for remount
@ 2009-02-20 10:02 KAMEZAWA Hiroyuki
  2009-02-20 16:22 ` Paul Menage
  2009-02-23  2:27 ` Li Zefan
  0 siblings, 2 replies; 11+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-02-20 10:02 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org; +Cc: menage, lizf, containers


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-02-24  1:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 10:02 Question for remount KAMEZAWA Hiroyuki
2009-02-20 16:22 ` Paul Menage
2009-02-21  0:45   ` KAMEZAWA Hiroyuki
2009-02-23  2:32     ` Li Zefan
2009-02-23 23:57       ` KAMEZAWA Hiroyuki
2009-02-24  1:33         ` Li Zefan
2009-02-23  2:27 ` Li Zefan
2009-02-23  2:56   ` Li Zefan
2009-02-24  1:36     ` KAMEZAWA Hiroyuki
2009-02-24  1:41       ` Li Zefan
2009-02-24  1:47         ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox