summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
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/blk-mq.c
parent973c01919bce7e3559b62a856b29211ec5ac325c (diff)
downloadop-kernel-dev-c68ed59f534c318716c6189050af3c5ea03b8071.zip
op-kernel-dev-c68ed59f534c318716c6189050af3c5ea03b8071.tar.gz
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/blk-mq.c')
-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 ce48116..e73a5dd 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);
OpenPOWER on IntegriCloud