summaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-05 13:15:09 -0800
committerJens Axboe <axboe@kernel.dk>2012-03-06 21:27:22 +0100
commit7a4dd281ec66224f802093962d1d903d86b09560 (patch)
treec38c5c40464d4d7eb429cc14348a435176832ef2 /block/blk-cgroup.h
parent4bfd482e73b30284cb21e10834ce729fa81aa256 (diff)
downloadtalos-obmc-linux-7a4dd281ec66224f802093962d1d903d86b09560.tar.gz
talos-obmc-linux-7a4dd281ec66224f802093962d1d903d86b09560.zip
blkcg: kill the mind-bending blkg->dev
blkg->dev is dev_t recording the device number of the block device for the associated request_queue. It is used to identify the associated block device when printing out configuration or stats. This is redundant to begin with. A blkg is an association between a cgroup and a request_queue and it of course is possible to reach request_queue from blkg and synchronization conventions are in place for safe q dereferencing, so this shouldn't be necessary from the beginning. Furthermore, it's initialized by sscanf()ing the device name of backing_dev_info. The mind boggles. Anyways, if blkg is visible under rcu lock, we *know* that the associated request_queue hasn't gone away yet and its bdi is registered and alive - blkg can't be created for request_queue which hasn't been fully initialized and it can't go away before blkg is removed. Let stat and conf read functions get device name from blkg->q->backing_dev_info.dev and pass it down to printing functions and remove blkg->dev. 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, 0 insertions, 2 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 9a5c68d7cc92..7ebecf6ea8f1 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -166,8 +166,6 @@ struct blkio_group {
unsigned short blkcg_id;
/* Store cgroup path */
char path[128];
- /* The device MKDEV(major, minor), this group has been created for */
- dev_t dev;
/* policy which owns this blk group */
enum blkio_policy_id plid;
OpenPOWER on IntegriCloud