[CRIU] [PATCH] cg: don't require properties for dumping

Tycho Andersen tycho.andersen at canonical.com
Tue Aug 12 13:10:57 PDT 2014


Hi Garrison,

On Tue, Aug 12, 2014 at 12:51:59PM -0700, Garrison Bellack wrote:
> Yes, this is one of the things I fixed in an upcoming patch set I should
> send out very soon. In the patch that addresses this issue, I have a
> slightly more robust solution during dump and it also checks during restore
> for the case of missing properties in the event of migration between
> different kernel versions with different cgroup properties.
> 
> Thank you for looking into this Tycho. Give me a little time and I will
> send out my solution.

I see. Thanks, we can ignore this patch for now, then.

Tycho

> 
> On Tue, Aug 12, 2014 at 12:31 PM, Tycho Andersen <
> tycho.andersen at canonical.com> wrote:
> 
> > We shouldn't require specific properties to be enabled when dumping, we
> > should
> > just dump them if they happen to be set.
> >
> > Cc: Garrison Bellack <gbellack at google.com>
> > Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> > ---
> >  cgroup.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/cgroup.c b/cgroup.c
> > index 8308413..f98b40f 100644
> > --- a/cgroup.c
> > +++ b/cgroup.c
> > @@ -409,6 +409,10 @@ static int add_cgroup_properties(const char *fpath,
> > struct cgroup_dir *ncd,
> >                         }
> >                         if (read_cgroup_prop(prop, fpath) < 0) {
> >                                 free_cgroup_prop(prop);
> > +
> > +                               if (errno == ENOENT)
> > +                                       continue;
> > +
> >                                 free_all_cgroup_props(ncd);
> >                                 return -1;
> >                         }
> > --
> > 1.9.1
> >
> >


More information about the CRIU mailing list