[Devel] [PATCH VZ10 v2 08/12] ve/cgroup-v2: Allow nested ve cgroup directories
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Dec 12 19:06:32 MSK 2025
On 12/10/25 11:34, Pavel Tikhomirov wrote:
> In cgroup-v2 we have no other way except allowing to enable ve
> controller on intermidiate cgroups (e.g. machine.slice). That means we
> have at least 3 levels.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-104639
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
>
> Feature: ve: ve generic structures
> ---
> kernel/ve/ve.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
> index 718d7811b629..ef2d802a3949 100644
> --- a/kernel/ve/ve.c
> +++ b/kernel/ve/ve.c
> @@ -947,7 +947,8 @@ static struct cgroup_subsys_state *ve_create(struct cgroup_subsys_state *parent_
> goto do_init;
>
> /* forbid nested containers */
│ + /* Forbid nested containers in cgroup v1 hierarchy */
│
> - if (css_to_ve(parent_css) != &ve0)
> + if (!cgroup_subsys_on_dfl(ve_cgrp_subsys) &&
> + css_to_ve(parent_css) != &ve0)
> return ERR_PTR(-ENOTDIR);
>
> err = -ENOMEM;
More information about the Devel
mailing list