summaryrefslogtreecommitdiff
path: root/block/blk-rq-qos.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2019-08-29 01:05:55 +0300
committerJens Axboe <axboe@kernel.dk>2019-08-29 06:17:07 +0300
commit9677a3e01f838622d2efc9a3ccb97090a2c3156a (patch)
tree8fee617bcc94779a92ab88c46d7862f0885a1282 /block/blk-rq-qos.c
parentd3e65ffff61c329fb2d0bf15736c440c2d0cfc97 (diff)
downloadlinux-9677a3e01f838622d2efc9a3ccb97090a2c3156a.tar.xz
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 <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-rq-qos.c')
-rw-r--r--block/blk-rq-qos.c9
1 files changed, 9 insertions, 0 deletions
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
*/