Commit 16fac1b5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

blk-iolatency: pass a gendisk to blk_iolatency_init

Pass the gendisk to blk_iolatency_init as part of moving the blk-cgroup
infrastructure to be gendisk based.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarAndreas Herrmann <aherrmann@suse.de>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220921180501.1539876-9-hch@lst.de
[axboe: missed inline for blk_iolatency_init() and !CONFIG_BLK_CGROUP_IOLATENCY]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b0dde3f5
...@@ -1265,7 +1265,7 @@ int blkcg_init_disk(struct gendisk *disk) ...@@ -1265,7 +1265,7 @@ int blkcg_init_disk(struct gendisk *disk)
if (ret) if (ret)
goto err_ioprio_exit; goto err_ioprio_exit;
ret = blk_iolatency_init(q); ret = blk_iolatency_init(disk);
if (ret) if (ret)
goto err_throtl_exit; goto err_throtl_exit;
......
...@@ -756,8 +756,9 @@ static void blkiolatency_enable_work_fn(struct work_struct *work) ...@@ -756,8 +756,9 @@ static void blkiolatency_enable_work_fn(struct work_struct *work)
} }
} }
int blk_iolatency_init(struct request_queue *q) int blk_iolatency_init(struct gendisk *disk)
{ {
struct request_queue *q = disk->queue;
struct blk_iolatency *blkiolat; struct blk_iolatency *blkiolat;
struct rq_qos *rqos; struct rq_qos *rqos;
int ret; int ret;
......
...@@ -389,9 +389,9 @@ static inline struct bio *blk_queue_bounce(struct bio *bio, ...@@ -389,9 +389,9 @@ static inline struct bio *blk_queue_bounce(struct bio *bio,
} }
#ifdef CONFIG_BLK_CGROUP_IOLATENCY #ifdef CONFIG_BLK_CGROUP_IOLATENCY
extern int blk_iolatency_init(struct request_queue *q); int blk_iolatency_init(struct gendisk *disk);
#else #else
static inline int blk_iolatency_init(struct request_queue *q) { return 0; } static inline int blk_iolatency_init(struct gendisk *disk) { return 0; };
#endif #endif
#ifdef CONFIG_BLK_DEV_ZONED #ifdef CONFIG_BLK_DEV_ZONED
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment