diff options
author | Christoph Hellwig <hch@lst.de> | 2023-02-03 16:03:47 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-02-03 08:20:05 -0700 |
commit | 84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2 (patch) | |
tree | 338edb3db9c6078f07403110e27b65c471818750 /block/bfq-cgroup.c | |
parent | 180b04d450a7137270c12dbb6bebf1d5e6c0a6f2 (diff) | |
download | linux-84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2.tar.gz linux-84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2.tar.bz2 linux-84d7d462b16dd5f0bf7c7ca9254bf81db2c952a2.zip |
blk-cgroup: pin the gendisk in struct blkcg_gq
Currently each blkcg_gq holds a request_queue reference, which is what
is used in the policies. But a lot of these interfaces will move over to
use a gendisk, so store a disk in struct blkcg_gq and hold a reference to
it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andreas Herrmann <aherrmann@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20230203150400.3199230-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-cgroup.c')
-rw-r--r-- | block/bfq-cgroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index b42956ab5550..1d4a3f15049b 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -405,7 +405,7 @@ static void bfqg_stats_xfer_dead(struct bfq_group *bfqg) parent = bfqg_parent(bfqg); - lockdep_assert_held(&bfqg_to_blkg(bfqg)->q->queue_lock); + lockdep_assert_held(&bfqg_to_blkg(bfqg)->disk->queue->queue_lock); if (unlikely(!parent)) return; @@ -536,7 +536,7 @@ static void bfq_pd_init(struct blkg_policy_data *pd) { struct blkcg_gq *blkg = pd_to_blkg(pd); struct bfq_group *bfqg = blkg_to_bfqg(blkg); - struct bfq_data *bfqd = blkg->q->elevator->elevator_data; + struct bfq_data *bfqd = blkg->disk->queue->elevator->elevator_data; struct bfq_entity *entity = &bfqg->entity; struct bfq_group_data *d = blkcg_to_bfqgd(blkg->blkcg); @@ -1201,7 +1201,7 @@ static u64 bfqg_prfill_stat_recursive(struct seq_file *sf, struct cgroup_subsys_state *pos_css; u64 sum = 0; - lockdep_assert_held(&blkg->q->queue_lock); + lockdep_assert_held(&blkg->disk->queue->queue_lock); rcu_read_lock(); blkg_for_each_descendant_pre(pos_blkg, pos_css, blkg) { |