diff options
author | Tejun Heo <tj@kernel.org> | 2012-03-05 16:15:17 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-06 15:27:23 -0500 |
commit | c1768268f9424410761da57ea71107acae7b03cc (patch) | |
tree | be6a534b1a15ab9df9f23e585b039776c5a5e498 /block/blk-throttle.c | |
parent | 549d3aa872cd1aec1ee540fd93afd9611faa0def (diff) |
blkcg: don't use blkg->plid in stat related functions
blkg is scheduled to be unified for all policies and thus there won't
be one-to-one mapping from blkg to policy. Update stat related
functions to take explicit @pol or @plid arguments and not use
blkg->plid.
This is painful for now but most of specific stat interface functions
will be replaced with a handful of generic helpers.
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-throttle.c')
-rw-r--r-- | block/blk-throttle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 153ba509446b..b2fddaf20b98 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -588,7 +588,8 @@ static void throtl_charge_bio(struct throtl_grp *tg, struct bio *bio) | |||
588 | tg->bytes_disp[rw] += bio->bi_size; | 588 | tg->bytes_disp[rw] += bio->bi_size; |
589 | tg->io_disp[rw]++; | 589 | tg->io_disp[rw]++; |
590 | 590 | ||
591 | blkiocg_update_dispatch_stats(tg_to_blkg(tg), bio->bi_size, rw, sync); | 591 | blkiocg_update_dispatch_stats(tg_to_blkg(tg), &blkio_policy_throtl, |
592 | bio->bi_size, rw, sync); | ||
592 | } | 593 | } |
593 | 594 | ||
594 | static void throtl_add_bio_tg(struct throtl_data *td, struct throtl_grp *tg, | 595 | static void throtl_add_bio_tg(struct throtl_data *td, struct throtl_grp *tg, |
@@ -1000,6 +1001,7 @@ bool blk_throtl_bio(struct request_queue *q, struct bio *bio) | |||
1000 | if (tg) { | 1001 | if (tg) { |
1001 | if (tg_no_rule_group(tg, rw)) { | 1002 | if (tg_no_rule_group(tg, rw)) { |
1002 | blkiocg_update_dispatch_stats(tg_to_blkg(tg), | 1003 | blkiocg_update_dispatch_stats(tg_to_blkg(tg), |
1004 | &blkio_policy_throtl, | ||
1003 | bio->bi_size, rw, | 1005 | bio->bi_size, rw, |
1004 | rw_is_sync(bio->bi_rw)); | 1006 | rw_is_sync(bio->bi_rw)); |
1005 | goto out_unlock_rcu; | 1007 | goto out_unlock_rcu; |