Hi Dhaval, Thanks for the reply. On Sat, Aug 6, 2011 at 1:38 AM, Dhaval Giani <dhaval.gi...@gmail.com> wrote:
> 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. > Yes, I do agree. I retested with -git, it is not unmounting/touching the subsystems that are already mounted. and unmounting all the controllers ( As I saw it to be doing earlier) was not probably the correct behaviour. > > > 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. > You are right here. second mount was intend to be under if, But it does not matter now. + if (error) { + cgroup_config_unmount_controllers(); + error = cgroup_config_mount_fs(); + } > > > if (error) > > goto err_mnt; > > > > > > > ------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel