summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2015-01-07 18:55:44 -0700
committerJens Axboe <axboe@fb.com>2015-01-08 08:55:40 -0700
commitc68ed59f534c318716c6189050af3c5ea03b8071 (patch)
tree6c37d638773c80c2f45b9ecb88d9e2ca60c210ba /block
parent973c01919bce7e3559b62a856b29211ec5ac325c (diff)
downloadlwn-c68ed59f534c318716c6189050af3c5ea03b8071.tar.gz
lwn-c68ed59f534c318716c6189050af3c5ea03b8071.zip
blk-mq: Let drivers cancel requeue_work
Kicking requeued requests will start h/w queues in a work_queue, which may alter the driver's requested state to temporarily stop them. This patch exports a method to cancel the q->requeue_work so a driver can be assured stopped h/w queues won't be started up before it is ready. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ce4811667d36..e73a5dd89fc4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -527,6 +527,12 @@ void blk_mq_add_to_requeue_list(struct request *rq, bool at_head)
}
EXPORT_SYMBOL(blk_mq_add_to_requeue_list);
+void blk_mq_cancel_requeue_work(struct request_queue *q)
+{
+ cancel_work_sync(&q->requeue_work);
+}
+EXPORT_SYMBOL_GPL(blk_mq_cancel_requeue_work);
+
void blk_mq_kick_requeue_list(struct request_queue *q)
{
kblockd_schedule_work(&q->requeue_work);