aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2015-01-07 20:55:44 -0500
committerJens Axboe <axboe@fb.com>2015-01-08 10:55:40 -0500
commitc68ed59f534c318716c6189050af3c5ea03b8071 (patch)
tree6c37d638773c80c2f45b9ecb88d9e2ca60c210ba /block
parent973c01919bce7e3559b62a856b29211ec5ac325c (diff)
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)
527} 527}
528EXPORT_SYMBOL(blk_mq_add_to_requeue_list); 528EXPORT_SYMBOL(blk_mq_add_to_requeue_list);
529 529
530void blk_mq_cancel_requeue_work(struct request_queue *q)
531{
532 cancel_work_sync(&q->requeue_work);
533}
534EXPORT_SYMBOL_GPL(blk_mq_cancel_requeue_work);
535
530void blk_mq_kick_requeue_list(struct request_queue *q) 536void blk_mq_kick_requeue_list(struct request_queue *q)
531{ 537{
532 kblockd_schedule_work(&q->requeue_work); 538 kblockd_schedule_work(&q->requeue_work);