summaryrefslogtreecommitdiffstats
path: root/include/linux/blk-mq.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-04-16 10:48:08 -0600
committerJens Axboe <axboe@fb.com>2014-04-16 14:15:25 -0600
commit70f4db639c5b2479e08657392cbf3ba3cceea11c (patch)
tree58a5acc839c2d0dd73436fcd6a95c8fe50bbccff /include/linux/blk-mq.h
parent1b4a325858f695a9b5041313602d34b36f463724 (diff)
downloadlinux-70f4db639c5b2479e08657392cbf3ba3cceea11c.tar.gz
linux-70f4db639c5b2479e08657392cbf3ba3cceea11c.tar.bz2
linux-70f4db639c5b2479e08657392cbf3ba3cceea11c.zip
blk-mq: add blk_mq_delay_queue
Add a blk-mq equivalent to blk_delay_queue so that the scsi layer can ask to be kicked again after a delay. Signed-off-by: Christoph Hellwig <hch@lst.de> Modified by me to kill the unnecessary preempt disable/enable in the delayed workqueue handler. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blk-mq.h')
-rw-r--r--include/linux/blk-mq.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 9ecfab96d8c9..ae868e77bc2f 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -18,7 +18,8 @@ struct blk_mq_hw_ctx {
} ____cacheline_aligned_in_smp;
unsigned long state; /* BLK_MQ_S_* flags */
- struct delayed_work delayed_work;
+ struct delayed_work run_work;
+ struct delayed_work delay_work;
cpumask_var_t cpumask;
unsigned long flags; /* BLK_MQ_F_* flags */
@@ -158,6 +159,7 @@ void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx);
void blk_mq_stop_hw_queues(struct request_queue *q);
void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async);
+void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs);
/*
* Driver command data is immediately after the request. So subtract request