[kernel] r15805 - in dists/sid/linux-2.6/debian/patches: features/all/openvz series

Ben Hutchings benh at alioth.debian.org
Sat May 29 10:17:26 UTC 2010


Author: benh
Date: Sat May 29 10:17:10 2010
New Revision: 15805

Log:
Revert ABI change needed for BLK_CGROUP which we don't enable

Added:
   dists/sid/linux-2.6/debian/patches/features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch
   dists/sid/linux-2.6/debian/patches/series/14-extra

Added: dists/sid/linux-2.6/debian/patches/features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch	Sat May 29 10:17:10 2010	(r15805)
@@ -0,0 +1,143 @@
+From 5b9779dd276987a84110cf3ea1ca6b3b3d81adaf Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Sat, 29 May 2010 04:18:54 +0100
+Subject: [PATCH 2/2] Revert "cgroup-lite: add cgroup-id for blk-cgroups"
+
+This reverts commit 983bb0952f838b55130f20a9486a04c92ae5826b.
+---
+ include/linux/cgroup.h |    2 -
+ kernel/cgroup_lite.c   |   77 ------------------------------------------------
+ 2 files changed, 0 insertions(+), 79 deletions(-)
+
+diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
+index fb7d985..0008dee 100644
+--- a/include/linux/cgroup.h
++++ b/include/linux/cgroup.h
+@@ -220,8 +220,6 @@ struct cgroup {
+ 
+ 	/* For RCU-protected deletion */
+ 	struct rcu_head rcu_head;
+-
+-	int cgroup_lite_id;
+ };
+ 
+ /*
+diff --git a/kernel/cgroup_lite.c b/kernel/cgroup_lite.c
+index 65575cc..629987f 100644
+--- a/kernel/cgroup_lite.c
++++ b/kernel/cgroup_lite.c
+@@ -19,73 +19,6 @@ static struct css_set init_css_set;
+ static struct cgroup init_cgroup;
+ static struct cftype *subsys_cftypes[CGROUP_SUBSYS_COUNT];
+ 
+-static struct idr cgroup_idr;
+-static DEFINE_SPINLOCK(cgroup_idr_lock);
+-
+-unsigned short css_id(struct cgroup_subsys_state *css)
+-{
+-	return css->cgroup->cgroup_lite_id;
+-}
+-
+-unsigned short css_depth(struct cgroup_subsys_state *css)
+-{
+-	return (css->cgroup == &init_cgroup) ? 0 : 1;
+-}
+-
+-int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen)
+-{
+-	snprintf(buf, buflen, "/%d", cgrp->cgroup_lite_id);
+-	return 0;
+-}
+-
+-struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id)
+-{
+-	struct cgroup *g;
+-
+-	BUG_ON(!ss->use_id);
+-	g = idr_find(&cgroup_idr, id);
+-	if (!g)
+-		return NULL;
+-	return g->subsys[ss->subsys_id];
+-}
+-
+-void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css)
+-{
+-}
+-
+-static int init_cgroup_id(struct cgroup *g)
+-{
+-	int err, id;
+-
+-	if (unlikely(!idr_pre_get(&cgroup_idr, GFP_KERNEL)))
+-		return -ENOMEM;
+-
+-	spin_lock(&cgroup_idr_lock);
+-	err = idr_get_new_above(&cgroup_idr, g, 1, &id);
+-	spin_unlock(&cgroup_idr_lock);
+-
+-	if (err)
+-		return err;
+-
+-	if (id > USHORT_MAX) {
+-		spin_lock(&cgroup_idr_lock);
+-		idr_remove(&cgroup_idr, id);
+-		spin_unlock(&cgroup_idr_lock);
+-		return -ENOSPC;
+-	}
+-
+-	g->cgroup_lite_id = id;
+-
+-	return 0;
+-}
+-
+-static void fini_cgroup_id(struct cgroup *g)
+-{
+-	spin_lock(&cgroup_idr_lock);
+-	idr_remove(&cgroup_idr, g->cgroup_lite_id);
+-	spin_unlock(&cgroup_idr_lock);
+-}
+-
+ void __css_put(struct cgroup_subsys_state *css)
+ {
+ 	atomic_dec(&css->refcnt);
+@@ -134,10 +67,6 @@ int init_ve_cgroups(struct ve_struct *ve)
+ 	if (cs == NULL)
+ 		goto err_calloc;
+ 
+-	err = init_cgroup_id(g);
+-	if (err)
+-		goto err_id;
+-
+ 	g->parent = &init_cgroup;
+ 	err = init_css_set_subsystems(g, cs);
+ 	if (err)
+@@ -149,8 +78,6 @@ int init_ve_cgroups(struct ve_struct *ve)
+ 	return 0;
+ 
+ err_subsys:
+-	fini_cgroup_id(g);
+-err_id:
+ 	kfree(cs);
+ err_calloc:
+ 	kfree(g);
+@@ -181,7 +108,6 @@ void fini_ve_cgroups(struct ve_struct *ve)
+ 			cs->destroy(cs, g);
+ 	}
+ 
+-	fini_cgroup_id(g);
+ 	kfree(g);
+ 	kfree(css);
+ 	ve->ve_cgroup = NULL;
+@@ -299,9 +225,6 @@ int __init cgroup_init(void)
+ {
+ 	get_ve0()->ve_cgroup = &init_cgroup;
+ 	get_ve0()->ve_css_set = &init_css_set;
+-	idr_init(&cgroup_idr);
+-	if (init_cgroup_id(&init_cgroup))
+-		panic("CG: Can't init initial cgroup id\n");
+ 	if (init_css_set_subsystems(&init_cgroup, &init_css_set) != 0)
+ 		panic("CG: Can't init initial set\n");
+ 	return 0;
+-- 
+1.7.1
+

Added: dists/sid/linux-2.6/debian/patches/series/14-extra
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/series/14-extra	Sat May 29 10:17:10 2010	(r15805)
@@ -0,0 +1 @@
++ features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch featureset=openvz



More information about the Kernel-svn-changes mailing list