On 30 April 2013 11:46, Glauber Costa <[email protected]> wrote: > Currently, vps_setup_res() have an explicit test for state != VPS_STARTING > before applying beancounter limits. This means that we can set limits without > further problems when the container is running, but will fail to do so when > the > container is starting. In fact, hooks_vz have an explicit call for it in its > startup function. > > We should do the same, and call our version of setlimits ourselves when the > container is coming up. > > Signed-off-by: Glauber Costa <[email protected]> > --- > src/lib/hooks_ct.c | 147 > +++++++++++++++++++++++++++-------------------------- > 1 file changed, 76 insertions(+), 71 deletions(-) > > diff --git a/src/lib/hooks_ct.c b/src/lib/hooks_ct.c > index 63af536..3cfb6e9 100644 > --- a/src/lib/hooks_ct.c > +++ b/src/lib/hooks_ct.c > @@ -153,6 +153,77 @@ static int _env_create(void *data) > return exec_container_init(arg, &create_param); > } > > +#define add_value(val, var, mult) do { if (val) { var = *val * mult; } } > while (0)
Aren't macroses supposed to be UPPER CASE named? -- _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
