]> www.infradead.org Git - users/hch/block.git/commitdiff
blk-wbt: open code wbt_queue_depth_changed in wbt_init
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Oct 2022 20:09:15 +0000 (13:09 -0700)
committerChristoph Hellwig <hch@lst.de>
Fri, 3 Feb 2023 08:07:38 +0000 (09:07 +0100)
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>
block/blk-wbt.c

index 58f41a98fda9115105871d502a201c97f627588e..119a43671089ea4f293ea3db555aab75a61a8f7a 100644 (file)
@@ -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.