On Fri, Aug 5, 2011 at 12:08 AM, Raghavendra K T <raghavendra...@linux.vnet.ibm.com> wrote: > In case of mount failure in cgconfigparser run, try to unmount controllers > and then retrying mount before going > to error handling path. > > This should fix alternate cgconfigparser failure when run manually and some > cases of cgconfig start failure when residual cgroup mounts still exist. >
Why is this the right fix? This (tries to) break other behaviour. We do not touch subsystems we have not modified. So let's say your first entry fails, nothing will be unmounted. (if it does that, then that behavior needs to be fixed). I can see your problem, but that is not a bug here. We just need to return saying that subsystems are already mounted, and exit. The behaviour is right. > From: Raghavendra K T <raghavendra...@linux.vnet.ibm.com> > Signed-off-by: Raghavendra K T <raghavendra...@linux.vnet.ibm.com> > --- > --- a/src/config.c 2011-08-04 16:20:40.000000000 +0530 > +++ b/src/config.c 2011-07-28 12:07:26.000000000 +0530 > @@ -775,13 +775,6 @@ int cgroup_config_load_config(const char > } > > error = cgroup_config_mount_fs(); > + /* > + * Error may be because something already mounted. unmount and retry > + */ > + if (error) We return ECGMOUNTFAIL if we fail to mount. Why do we care about the other conditions here? > + cgroup_config_unmount_controllers(); > + > + error = cgroup_config_mount_fs(); Also, here we run cgroup_config_mount_fs() twice. What happens if we succeed the first time? Also, what happens if I have cpu, memory mounted and my config file touches both cpu and memory. > if (error) > goto err_mnt; > > > ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel