diff options
author | Ricky Benitez <rickyb@google.com> | 2010-04-05 18:22:17 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-05 18:22:17 +0200 |
commit | a74b2adae06265b8cfa335d7d40d4a5abd11e977 (patch) | |
tree | 13f3204faa4fc4bef6270bfaa269ea45474c39f1 /block/cfq-iosched.c | |
parent | 144214537370b4f133a735446ebe86e90cfb2501 (diff) | |
download | linux-3.10-a74b2adae06265b8cfa335d7d40d4a5abd11e977.tar.gz linux-3.10-a74b2adae06265b8cfa335d7d40d4a5abd11e977.tar.bz2 linux-3.10-a74b2adae06265b8cfa335d7d40d4a5abd11e977.zip |
block: expose the statistics in blkio.time and blkio.sectors for the root cgroup
Currently, the io statistics for the root cgroup are maintained, but
they are not shown because the device information is not available at
the point that the root blkio cgroup is created. This patch updates
the device information when the statistics are updated so that the
statistics become visible.
Signed-off-by: Ricky Benitez <rickyb@google.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 2c7a0f4f3cd..7104ac816fb 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -948,6 +948,11 @@ cfq_find_alloc_cfqg(struct cfq_data *cfqd, struct cgroup *cgroup, int create) unsigned int major, minor; cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key)); + if (cfqg && !cfqg->blkg.dev && bdi->dev && dev_name(bdi->dev)) { + sscanf(dev_name(bdi->dev), "%u:%u", &major, &minor); + cfqg->blkg.dev = MKDEV(major, minor); + goto done; + } if (cfqg || !create) goto done; |