diff options
author | Keith Busch <keith.busch@intel.com> | 2015-01-07 20:55:44 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-08 10:55:40 -0500 |
commit | c68ed59f534c318716c6189050af3c5ea03b8071 (patch) | |
tree | 6c37d638773c80c2f45b9ecb88d9e2ca60c210ba /block | |
parent | 973c01919bce7e3559b62a856b29211ec5ac325c (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.c | 6 |
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 | } |
528 | EXPORT_SYMBOL(blk_mq_add_to_requeue_list); | 528 | EXPORT_SYMBOL(blk_mq_add_to_requeue_list); |
529 | 529 | ||
530 | void blk_mq_cancel_requeue_work(struct request_queue *q) | ||
531 | { | ||
532 | cancel_work_sync(&q->requeue_work); | ||
533 | } | ||
534 | EXPORT_SYMBOL_GPL(blk_mq_cancel_requeue_work); | ||
535 | |||
530 | void blk_mq_kick_requeue_list(struct request_queue *q) | 536 | void 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); |