Skip to content

Commit

Permalink
blk-wbt: open code wbt_queue_depth_changed in wbt_init
Browse files Browse the repository at this point in the history
wbt_queue_depth_changed just updates a field and calls another function.
Open code it in wbt_init, so that the local queue variable can be used
instead of the one stored in the rq_qos.  This will allow delaying that
rq_qos->queue assignment in a subsequent patch.

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-12-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Feb 3, 2023
1 parent 0bc65bd commit 4e1d91a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/blk-wbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ int wbt_init(struct gendisk *disk)
rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags);
rwb->rq_depth.default_depth = RWB_DEF_DEPTH;
rwb->min_lat_nsec = wbt_default_latency_nsec(q);

wbt_queue_depth_changed(&rwb->rqos);
rwb->rq_depth.queue_depth = blk_queue_depth(q);
wbt_update_limits(rwb);

/*
* Assign rwb and add the stats callback.
Expand Down

0 comments on commit 4e1d91a

Please sign in to comment.