[CRIU] [PATCH 2/2] cg: Add ability to dump custom cgroup properties

Cyrill Gorcunov gorcunov at gmail.com
Thu Apr 14 06:12:19 PDT 2016


On Thu, Apr 14, 2016 at 04:07:34PM +0300, Pavel Emelyanov wrote:
> 
> >>>  const cgp_t *cgp_get_props(const char *name)
> >>>  {
> >>> +	cgp_list_t *p;
> >>>  	size_t i;
> >>>  
> >>>  	for (i = 0; i < ARRAY_SIZE(cgp_predefined); i++) {
> >>> @@ -107,5 +289,19 @@ const cgp_t *cgp_get_props(const char *name)
> >>>  			return &cgp_predefined[i];
> >>>  	}
> >>>  
> >>> +	list_for_each_entry(p, &cgp_list, list) {
> >>> +		if (!strcmp(p->cgp.name, name))
> >>> +			return &p->cgp;
> >>
> >> This makes it impossible to override existing built-in prop lists.
> > 
> > Do we really want to override predefined prop list?
> 
> Not only override, but also extend I would say ;)

OK, which strategy the is preferred for you? Should we override
predefined props or simply extend them?


More information about the CRIU mailing list