aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-05 16:15:11 -0500
committerJens Axboe <axboe@kernel.dk>2012-03-06 15:27:23 -0500
commit7ee9c5620504906e98451dc9a1945b2b9e892cb8 (patch)
tree1daf4d9fc8d03ebbc88ceedb7abeec46d8c71df3 /block/blk-cgroup.h
parent92616b5b3a7c7fa8148df82e7ff6183056f2bfc8 (diff)
blkcg: let blkio_group point to blkio_cgroup directly
Currently, blkg points to the associated blkcg via its css_id. This unnecessarily complicates dereferencing blkcg. Let blkg hold a reference to the associated blkcg and point directly to it and disable css_id on blkio_subsys. This change requires splitting blkiocg_destroy() into blkiocg_pre_destroy() and blkiocg_destroy() so that all blkg's can be destroyed and all the blkcg references held by them dropped during cgroup removal. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 7ebecf6ea8f1..ca1fc637bd6e 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -163,7 +163,7 @@ struct blkio_group {
163 /* Pointer to the associated request_queue, RCU protected */ 163 /* Pointer to the associated request_queue, RCU protected */
164 struct request_queue __rcu *q; 164 struct request_queue __rcu *q;
165 struct hlist_node blkcg_node; 165 struct hlist_node blkcg_node;
166 unsigned short blkcg_id; 166 struct blkio_cgroup *blkcg;
167 /* Store cgroup path */ 167 /* Store cgroup path */
168 char path[128]; 168 char path[128];
169 /* policy which owns this blk group */ 169 /* policy which owns this blk group */