From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id B66E9803BB for ; Mon, 16 Nov 2026 19:22:04 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AGJKqpD030966; Mon, 16 Nov 2026 22:20:53 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AGJKqpD030966 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="ZDuNZGfh" Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AGJKkkt030933 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 16 Nov 2026 22:20:46 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AGJKkkt030933 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4a1f03f2e8aso33159685e9.1 for ; Mon, 16 Nov 2026 11:20:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErGpY6MPXDwOwIfP6SQsLfIIdCb6CIDCyPQD5cywLEbdtcuZH+WRoGS9xVPovE8KreG2/E6DpA==@openvz.org X-Gm-Message-State: APuU4Z9VbH76JLG05fhBj0dYHFR10cX1VFyPIjZf7jDinKlrP74vLfar oxwpSbrpeOoibY7MmYx8L8IdvNV2ROpjVhF5dvMZvr9fMrBcC+hrTobmOs3lHR9f50/J2ibLmt/ K7+SqLnWKTJJkixj5rg84oxIFevlQaSgEuhXfVGLEEZsY98OMseQj5g== X-Gm-Gg: AYBFou2kuSJ4Tmw4v5r/jpdkJz/4QuY96RXZWlZrcuGv2gHQLU6D7h0MWjy0UHGWOcs 5Mg1TaLQOovOb9ABkZ1e+7YS6tbgqvYRAjypZzc0B9Y1eaSvYriogXcZGMZ/yKzsYts0pyvn9ht PbGYrto4I+fEmYq1oOIM92GWVkuRPQydHx7ee0WpUyV/0nqvlTa1A03CgXSQbaMZ0lnGh/AKA1U rskHnzvUZI+Cw4qNcmJ9Ut+gN0ypDeCbhlTU6Qn7J9yD0IF7vf75sE3bN2lY+S4/rQfYX5HSbhk 3fESe1lySV2ZqdzqhZxws+gUaCS45fBly7RWdQZgHFn08Hi7gnAizRgCkysRVE1z7esogor9Td3 2zjfbdHed9lyB+s1w/A1HBaCyCVwAiA== X-Received: by 2002:a05:600c:34d0:b0:4a2:5ca:767f with SMTP id 5b1f17b1804b1-4bb559f3737mr231059625e9.4.1794856845946; Mon, 16 Nov 2026 11:20:45 -0800 (PST) X-Received: by 2002:a05:600c:34d0:b0:4a2:5ca:767f with SMTP id 5b1f17b1804b1-4bb559f3737mr231059325e9.4.1794856845426; Mon, 16 Nov 2026 11:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794856845; cv=none; d=google.com; s=arc-20260327; b=iRiX/coj76/69OJX5fk6eJZKR8P15/r1SSEBvvcH5ShUG2DMxMkOiIvPyVZCjOYUnx zsn5sWUvkhcc0oot/j1MpRg5UemS+k8Xiq8H/CkBcyHElXPCcKnyobsPGUHNZmUaRsHL AI7Us79CYkrhRHabLYBKxlu04N7xx7XyJ784OS262T7rbouioGS4uNex9javVLgMqtgH W/TeCz7DMkkXzXeHnHdEvl7clJIPzGnKqUxwvauEVzMZVlsSnHh4/XbAZrvZwRaVf6Bw DzglD48Wv8TFKo0MIg3Ejcspb7RkUYMZSlPCOs8MZb2ugAr4CX/nDnG1T7nN2yhhYHQC CTCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=PuVAxyICIrLIM9Xf5pJOp8ReQzSfRu6X49WVnP98UF0=; fh=eCOFrBZAqsL6jjT8ApulcBPCLrgIlXlNCEpSn7Ap5O8=; b=Kwa3BvsqYWBhJKe3OQl9iFE5x1kNyIpsxVLGhXIEaxMR8QzzNT1sIUd5XfxUK/IMjD sKtalDKyeVgT0xQToxVmkEOXcyn8M0Vr/VS5Z19UNo0DvTe5Whnoh6psVLwzEF1RJMdH z2adGYLu9NCXexsvTMVvI3cwiekv6nJWdAUZTfBagjc833Ebc2oB5JAafVcf/F5ZsWYB RB85ufxKssU+dHTDzc408kPsiOVloe10X0kPFqJEfTN84mk8cD3dpNp/BYAZvfKpg+rq YVfFlIA7Vy1Ty3NH5vcUyqwgEAvZoPcNHMcBJ7+ZWOySDK8mH/6a6kPakSvCyWYoF6NZ ichQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=ZDuNZGfh; spf=pass (google.com: domain of vladimir.riabchun@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vladimir.riabchun@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id 5b1f17b1804b1-4bb5b48f449si22441085e9.0.2026.11.16.11.20.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 11:20:45 -0800 (PST) Received-SPF: pass (google.com: domain of vladimir.riabchun@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=ZDuNZGfh; spf=pass (google.com: domain of vladimir.riabchun@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=vladimir.riabchun@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Content-Type:MIME-Version:Subject:Date :From; bh=PuVAxyICIrLIM9Xf5pJOp8ReQzSfRu6X49WVnP98UF0=; b=ZDuNZGfhrroskXoy8q2 IDk5PtA1SIu/zDFPQjvOMgV5vTh85xjphHYGWLQqkkJuM0vln5ZWw7iwt97SHTIYTmPSl5IzX/8qz bp1DFVJz6QHfBnAGCR47aOt7l7fAMq3OCPXVCet1ev28CHtP56aigG9fFusl07rNYIuEPXRNBeEb2 66t6QaSUD0Xo9XhhOsIB9Q7R52CGE9CEdtVU0hsBxUwHSIcvvYDE7Wo9E251+BFXGMhr/hNrSBGIz S7lrgciSbXDwl9s5pqLZj3//879EC7gNh8d0LJmLwZCStJDtlFwGB6iyPGgjJZ8nrza9rTGu2UShk ejIIKP4W/hbALYA==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=192.168.1.87) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1xT2Bh-00A2lb-29; Mon, 16 Nov 2026 20:20:36 +0100 From: Vladimir Riabchun Date: Mon, 16 Nov 2026 20:20:39 +0100 MIME-Version: 1.0 Message-Id: <20261116-ovl-use-orig-ve-v8-1-dfe427bfd902@virtuozzo.com> References: <20261116-ovl-use-orig-ve-v8-0-dfe427bfd902@virtuozzo.com> In-Reply-To: <20261116-ovl-use-orig-ve-v8-0-dfe427bfd902@virtuozzo.com> To: vasileios.almpanis@virtuozzo.com, ptikhomirov@virtuozzo.com, Konstantin Khorenko X-Mailer: b4 0.16.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v8 1/6] ve: Remove STOPPED state X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org We don't need extra STOPPED state. It makes us feel that CT could be started again from it, but it is actually not true. Separate STOPPED state doesn't bring any value. Drop it and transition VE to DEAD state directly on the stop, instead of doing it in ve_destroy. https://virtuozzo.atlassian.net/browse/VSTOR-142405 Reviewed-by: Pavel Tikhomirov Signed-off-by: Vladimir Riabchun --- include/linux/ve.h | 3 +-- kernel/ve/ve.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/linux/ve.h b/include/linux/ve.h index a400d21593b2..717567775f58 100644 --- a/include/linux/ve.h +++ b/include/linux/ve.h @@ -40,8 +40,7 @@ struct vfsmount; #define VE_STATE_STARTING 0 #define VE_STATE_RUNNING 1 #define VE_STATE_STOPPING 2 -#define VE_STATE_STOPPED 3 -#define VE_STATE_DEAD 4 +#define VE_STATE_DEAD 3 #define VE_IS_RUNNING(ve) ((ve)->state == VE_STATE_RUNNING) diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c index cdfd03416b39..d3f02fe118ca 100644 --- a/kernel/ve/ve.c +++ b/kernel/ve/ve.c @@ -608,7 +608,7 @@ static int ve_start_container(struct ve_struct *ve) err_mark_ve: ve_list_del(ve); err_list: - ve_set_state(ve, VE_STATE_STOPPED); + ve_set_state(ve, VE_STATE_DEAD); ve_drop_context(ve); return err; } @@ -684,7 +684,7 @@ void ve_exit_ns(struct pid_namespace *pid_ns) ve_hook_iterate_fini(VE_SS_CHAIN, ve); ve_list_del(ve); ve_drop_context(ve); - ve_set_state(ve, VE_STATE_STOPPED); + ve_set_state(ve, VE_STATE_DEAD); up_write(&ve->op_sem); printk(KERN_INFO "CT: %s: stopped\n", ve_name(ve)); @@ -930,7 +930,6 @@ static void ve_destroy(struct cgroup_subsys_state *css) mntput(ve->devtmpfs_mnt); free_percpu(ve->sched_lat_ve.cur); kfree(ve->ve_name); - ve_set_state(ve, VE_STATE_DEAD); kmem_cache_free(ve_cachep, ve); } @@ -950,7 +949,6 @@ static int ve_state_show(struct seq_file *sf, void *v) case VE_STATE_STOPPING: seq_puts(sf, "STOPPING"); break; - case VE_STATE_STOPPED: case VE_STATE_DEAD: seq_puts(sf, "STOPPED"); break; -- 2.52.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel