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>

authored by Ricky Benitez and committed by Jens Axboe a74b2ada 14421453

+5
+5
block/cfq-iosched.c
··· 948 948 unsigned int major, minor; 949 949 950 950 cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key)); 951 + if (cfqg && !cfqg->blkg.dev && bdi->dev && dev_name(bdi->dev)) { 952 + sscanf(dev_name(bdi->dev), "%u:%u", &major, &minor); 953 + cfqg->blkg.dev = MKDEV(major, minor); 954 + goto done; 955 + } 951 956 if (cfqg || !create) 952 957 goto done; 953 958