aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-01 17:38:44 -0400
committerTejun Heo <tj@kernel.org>2012-04-01 17:38:44 -0400
commitd366e7ec41882791c970dfb7c67b737be8c3a174 (patch)
tree78d3c73d90276b797e1553c004272af869a30075 /block/cfq-iosched.c
parentaf133ceb261033eb43c03d161a991c3b772e8c56 (diff)
blkcg: pass around pd->pdata instead of pd itself in prfill functions
Now that all conf and stat fields are moved into policy specific blkio_policy_data->pdata areas, there's no reason to use blkio_policy_data itself in prfill functions. Pass around @pd->pdata instead of @pd. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index adab10de6eea..fd505f721f61 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1368,14 +1368,13 @@ static void cfq_link_cfqq_cfqg(struct cfq_queue *cfqq, struct cfq_group *cfqg)
1368 cfqg_get(cfqg); 1368 cfqg_get(cfqg);
1369} 1369}
1370 1370
1371static u64 cfqg_prfill_weight_device(struct seq_file *sf, 1371static u64 cfqg_prfill_weight_device(struct seq_file *sf, void *pdata, int off)
1372 struct blkg_policy_data *pd, int off)
1373{ 1372{
1374 struct cfq_group *cfqg = (void *)pd->pdata; 1373 struct cfq_group *cfqg = pdata;
1375 1374
1376 if (!cfqg->dev_weight) 1375 if (!cfqg->dev_weight)
1377 return 0; 1376 return 0;
1378 return __blkg_prfill_u64(sf, pd, cfqg->dev_weight); 1377 return __blkg_prfill_u64(sf, pdata, cfqg->dev_weight);
1379} 1378}
1380 1379
1381static int cfqg_print_weight_device(struct cgroup *cgrp, struct cftype *cft, 1380static int cfqg_print_weight_device(struct cgroup *cgrp, struct cftype *cft,
@@ -1443,10 +1442,9 @@ static int cfq_set_weight(struct cgroup *cgrp, struct cftype *cft, u64 val)
1443} 1442}
1444 1443
1445#ifdef CONFIG_DEBUG_BLK_CGROUP 1444#ifdef CONFIG_DEBUG_BLK_CGROUP
1446static u64 cfqg_prfill_avg_queue_size(struct seq_file *sf, 1445static u64 cfqg_prfill_avg_queue_size(struct seq_file *sf, void *pdata, int off)
1447 struct blkg_policy_data *pd, int off)
1448{ 1446{
1449 struct cfq_group *cfqg = (void *)pd->pdata; 1447 struct cfq_group *cfqg = pdata;
1450 u64 samples = blkg_stat_read(&cfqg->stats.avg_queue_size_samples); 1448 u64 samples = blkg_stat_read(&cfqg->stats.avg_queue_size_samples);
1451 u64 v = 0; 1449 u64 v = 0;
1452 1450
@@ -1454,7 +1452,7 @@ static u64 cfqg_prfill_avg_queue_size(struct seq_file *sf,
1454 v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum); 1452 v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum);
1455 do_div(v, samples); 1453 do_div(v, samples);
1456 } 1454 }
1457 __blkg_prfill_u64(sf, pd, v); 1455 __blkg_prfill_u64(sf, pdata, v);
1458 return 0; 1456 return 0;
1459} 1457}
1460 1458