Commit 958f2965 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

blk-wbt: pass a gendisk to wbt_init

Pass a gendisk to wbt_init to prepare for phasing out usage of the
request_queue in the blk-cgroup code.
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/20230203150400.3199230-10-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 04aad37b
...@@ -500,7 +500,7 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page, ...@@ -500,7 +500,7 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page,
rqos = wbt_rq_qos(q); rqos = wbt_rq_qos(q);
if (!rqos) { if (!rqos) {
ret = wbt_init(q); ret = wbt_init(q->disk);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -671,7 +671,7 @@ void wbt_enable_default(struct gendisk *disk) ...@@ -671,7 +671,7 @@ void wbt_enable_default(struct gendisk *disk)
return; return;
if (queue_is_mq(q) && !disable_flag) if (queue_is_mq(q) && !disable_flag)
wbt_init(q); wbt_init(disk);
} }
EXPORT_SYMBOL_GPL(wbt_enable_default); EXPORT_SYMBOL_GPL(wbt_enable_default);
...@@ -835,8 +835,9 @@ static struct rq_qos_ops wbt_rqos_ops = { ...@@ -835,8 +835,9 @@ static struct rq_qos_ops wbt_rqos_ops = {
#endif #endif
}; };
int wbt_init(struct request_queue *q) int wbt_init(struct gendisk *disk)
{ {
struct request_queue *q = disk->queue;
struct rq_wb *rwb; struct rq_wb *rwb;
int i; int i;
int ret; int ret;
......
...@@ -90,7 +90,7 @@ static inline unsigned int wbt_inflight(struct rq_wb *rwb) ...@@ -90,7 +90,7 @@ static inline unsigned int wbt_inflight(struct rq_wb *rwb)
#ifdef CONFIG_BLK_WBT #ifdef CONFIG_BLK_WBT
int wbt_init(struct request_queue *); int wbt_init(struct gendisk *disk);
void wbt_disable_default(struct gendisk *disk); void wbt_disable_default(struct gendisk *disk);
void wbt_enable_default(struct gendisk *disk); void wbt_enable_default(struct gendisk *disk);
...@@ -104,7 +104,7 @@ u64 wbt_default_latency_nsec(struct request_queue *); ...@@ -104,7 +104,7 @@ u64 wbt_default_latency_nsec(struct request_queue *);
#else #else
static inline int wbt_init(struct request_queue *q) static inline int wbt_init(struct gendisk *disk)
{ {
return -EINVAL; return -EINVAL;
} }
......
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