From 9677a3e01f838622d2efc9a3ccb97090a2c3156a Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 28 Aug 2019 15:05:55 -0700 Subject: block/rq_qos: implement rq_qos_ops->queue_depth_changed() wbt already gets queue depth changed notification through wbt_set_queue_depth(). Generalize it into rq_qos_ops->queue_depth_changed() so that other rq_qos policies can easily hook into the events too. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe --- block/blk-rq-qos.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'block/blk-rq-qos.c') diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c index f4eea78f5cc1..61b635bc2a31 100644 --- a/block/blk-rq-qos.c +++ b/block/blk-rq-qos.c @@ -101,6 +101,15 @@ void __rq_qos_done_bio(struct rq_qos *rqos, struct bio *bio) } while (rqos); } +void __rq_qos_queue_depth_changed(struct rq_qos *rqos) +{ + do { + if (rqos->ops->queue_depth_changed) + rqos->ops->queue_depth_changed(rqos); + rqos = rqos->next; + } while (rqos); +} + /* * Return true, if we can't increase the depth further by scaling */ -- cgit v1.2.3