Skip to content

Commit

Permalink
block: expose the statistics in blkio.time and blkio.sectors for the …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Acked-by: Vivek Goyal <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Ricky Benitez authored and Jens Axboe committed Apr 5, 2010
1 parent 1442145 commit a74b2ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a74b2ad

Please sign in to comment.