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 1BAB88045D for ; Mon, 26 Oct 2026 14:53:51 +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 69QEqXG9011903; Mon, 26 Oct 2026 17:52:34 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69QEqXG9011903 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="YrErRkco" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69QEqSVQ011873 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 26 Oct 2026 17:52:28 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69QEqSVQ011873 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48c46582442so1827885f8f.0 for ; Mon, 26 Oct 2026 07:52:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBzcJO+g2b3GfyL4VNU/LQNjVrQjThRjwEhpJEapc25e5LpHR3+LnVCT/JiLUz7q14YozzGESg==@openvz.org X-Gm-Message-State: AFq9FYJLr0RXufU1vcsIgXwn0U5IUOwXWHqSsPWvk92b9tSrkdHx/m7U yNgAG0gzTJOYW/FLzlG7ju62m+3ToksOa7eqgBQ3p9/7qzIW8E7Agfpg6f9kG6/xMP0EMMzUw/H v/OQ/dAPlsCJGSxQiGh4JAti17vS71TyiN++bBPEmezfROn7G0WrH8w== X-Gm-Gg: AYBFou2yaMGtE0tA7LuIgXswN+4Qz2RYZXlcAYGOt57wJCDhtUW8tBWJqSs22GbYxQe yvDZRO+zU5V11OXxedBcUcpihRkwh2tqXgB4KrIEen7RcSvLXuQ8rb+ouvPXqAcro1Lb1O1gHRL QOPGlSqA2wd7cN671qcKQ4YwrURFCVlOo7CIgCLHKnzGHdZ2sGU/DjMtyDzINcuAErdMzpqWyFY zw/iBbGlbTEVqK/z3rH4dgb0D+zaXPlTyOEGH4O/ePNM81X2W4t1wCQgvNDzro5+UXWIKcwZjBr cjJu6ipKyMn9h2grcmKNC+4SG9kqP4RrA/Pm9f9Ln6s+zY2SP+WMZ942SzZQVeq40OyVXX4AxE4 ZX0BG90HrB0inqj2vqRuh5rxskMUHgw== X-Received: by 2002:adf:fdc4:0:b0:48c:7d67:8ee5 with SMTP id ffacd0b85a97d-48e3eb9a2ddmr9548792f8f.43.1793026348164; Mon, 26 Oct 2026 07:52:28 -0700 (PDT) X-Received: by 2002:adf:fdc4:0:b0:48c:7d67:8ee5 with SMTP id ffacd0b85a97d-48e3eb9a2ddmr9548743f8f.43.1793026347577; Mon, 26 Oct 2026 07:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793026347; cv=none; d=google.com; s=arc-20260327; b=Grb4M2CahC2e2z7SSVqTnX7KVMlOAqNWR47Kk5ZHRztWwny/MrsY2A6U+1m38f4LYS YkJdqVnJcuNkTyqFOGycYq+NTHh62tT1rRGh7QlGzPX+G5J7PKheN3jHullGS/PsUCWI ywIIDIi5X2d8xhGhxAa24pz4/9hEcEwxnDcTFdmVTPHlt5ZPRjfIYESdnXrDol4NIyNW /gIlDwnmGW8QBiQjMLDgzIVrhRQqwxlrKRI7lndXkE7086rZvQPcfu3gH3pxklsbN7Kr FfLwERYVvPs4RVNxO0Iz/9ti1XxBk2804QqHH3Rd93xIbOtDoVlQFNt6a9C/oSkB0spK DxQQ== 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=TRHNvEy50PcnXsaCteDhLFIaqJiowxryzxfpTwHLJcI=; fh=cWfQ0WqBv1Pw7PhINIHK2v1yyoiscNQykPdEfpvTs1g=; b=B1UXG+oe/g9K8wLnwllvYGfWKwEh8uk8uudAAU8q8He4hjyoBj6ZtIcBoN0Zq9dxrO SWpjdscWB8TZFt47iNEq9W0erZMgZ8VCfFLX25PENoG2Sqs5a2L4lyhoriAEtR8axEx0 so6XdDiOyIvQcW0c+c6NZBOlL4o/uNktI39l8o3ZsGD8WxVWiZLB6l80Grm6hXNSxpbb XzKJyjDUS1Ar2trJozECB1piPgSZKBRQQuVPg2xQp7yYah2YGZ0MhagDxTvXNJBYMzh8 he7mcazWeFJMmXMpPu9UDuPu8wuh86RPxEBcN9WwyRSO7+NQfZn8ePMn45vusws8XNKD pyBA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=YrErRkco; 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 ffacd0b85a97d-48e3ed21b72si14885761f8f.437.2026.10.26.07.52.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 07:52:27 -0700 (PDT) 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=YrErRkco; 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=TRHNvEy50PcnXsaCteDhLFIaqJiowxryzxfpTwHLJcI=; b=YrErRkcokkBN64JkXFb lGu64U//GXWx25mCl+7v3Jg4qwbJ+bff8HTW2b3gEmCYvLuiiNk4K/OjGik0w1m429le5l7HH28xE 6GU7UrMJ8NhCsfcrTybNhD3zROGvsmv3yINzYO8Vzzc7voGxMJvOGjQVUKejBKu//cvpw+er8WXVb cse9xOoWYN/piQslIcmk84HVHDweeUg6rjBTQ/gFsPFgHdR50JWyx5yXE4hwLEFrPnsyqtFtMkS6p bF9tCueG9PpPCWn/GzfzRomucjsvjFh0Ik9Ewkawfqh2sTx7/qaGDW2jADqYN4IAsq9vCz3OLJevp Fgf9gXwGrDZvwAQ==; 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 1xLM03-004zLL-36; Mon, 26 Oct 2026 15:52:18 +0100 From: Vladimir Riabchun Date: Mon, 26 Oct 2026 15:52:20 +0100 MIME-Version: 1.0 Message-Id: <20261026-ovl-use-orig-ve-v2-1-eab58bfc29ca@virtuozzo.com> References: <20261026-ovl-use-orig-ve-v2-0-eab58bfc29ca@virtuozzo.com> In-Reply-To: <20261026-ovl-use-orig-ve-v2-0-eab58bfc29ca@virtuozzo.com> To: Konstantin Khorenko , ptikhomirov@virtuozzo.com, vasileios.almpanis@virtuozzo.com X-Mailer: b4 0.16.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 1/4] 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 stated doesn't bring any value. Drop it and transition VE to DEAD state directly on the stop. https://virtuozzo.atlassian.net/browse/VSTOR-142405 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 579628a8a310..d74f74ca958a 100644 --- a/kernel/ve/ve.c +++ b/kernel/ve/ve.c @@ -604,7 +604,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; } @@ -680,7 +680,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)); @@ -935,7 +935,6 @@ static void ve_destroy(struct cgroup_subsys_state *css) ve_free_vdso(ve); mntput(ve->devtmpfs_mnt); free_percpu(ve->sched_lat_ve.cur); - ve_set_state(ve, VE_STATE_DEAD); kmem_cache_free(ve_cachep, ve); } @@ -955,7 +954,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