[Devel] [PATCH rh7] ve: remove fairsched node only in the legacy mode
Vladimir Davydov
vdavydov at parallels.com
Fri May 29 03:58:15 PDT 2015
Currently, we try and fail to remove the fairsched node of a UUID-named
container from the kernel on stop:
CT: 956ebfc3-3ca9-44e0-9739-ab8abbe50edc: started
Can't remove fairsched node 1073741823 err=-2
CT: 956ebfc3-3ca9-44e0-9739-ab8abbe50edc: stopped
We should only do that for containers created via the legacy API (vzctl
ioctl), because for UUID-named containers this is a duty of vzctl.
https://jira.sw.ru/browse/PSBM-33833
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
include/linux/ve.h | 3 +++
kernel/ve/vecalls.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/ve.h b/include/linux/ve.h
index 03e90e481082..ef15447df868 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -40,6 +40,9 @@ struct ve_struct {
struct list_head ve_list;
envid_t veid;
+ bool legacy; /* created using the legacy API
+ (vzctl ioctl - see do_env_create) */
+
unsigned int class_id;
struct rw_semaphore op_sem;
int is_running;
diff --git a/kernel/ve/vecalls.c b/kernel/ve/vecalls.c
index 346a070e036b..63c2ee0fd47d 100644
--- a/kernel/ve/vecalls.c
+++ b/kernel/ve/vecalls.c
@@ -447,6 +447,7 @@ static int do_env_create(envid_t veid, unsigned int flags, u32 class_id,
goto err_devperms;
ve = cgroup_ve(ve_cgroup);
+ ve->legacy = true;
init_ve_struct(ve, class_id, data, datalen);
@@ -638,7 +639,7 @@ static void vzmon_stop_notifier(void *data)
{
struct ve_struct *ve = data;
- if (ve->veid)
+ if (ve->legacy)
fairsched_drop_node(ve->veid, 0);
}
--
2.1.4
More information about the Devel
mailing list