aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index e11f5f8e0313..ad69ef657e85 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -109,7 +109,7 @@ static void blk_mq_queue_exit(struct request_queue *q)
109 __percpu_counter_add(&q->mq_usage_counter, -1, 1000000); 109 __percpu_counter_add(&q->mq_usage_counter, -1, 1000000);
110} 110}
111 111
112static void __blk_mq_drain_queue(struct request_queue *q) 112void blk_mq_drain_queue(struct request_queue *q)
113{ 113{
114 while (true) { 114 while (true) {
115 s64 count; 115 s64 count;
@@ -120,7 +120,7 @@ static void __blk_mq_drain_queue(struct request_queue *q)
120 120
121 if (count == 0) 121 if (count == 0)
122 break; 122 break;
123 blk_mq_run_queues(q, false); 123 blk_mq_start_hw_queues(q);
124 msleep(10); 124 msleep(10);
125 } 125 }
126} 126}
@@ -139,12 +139,7 @@ static void blk_mq_freeze_queue(struct request_queue *q)
139 spin_unlock_irq(q->queue_lock); 139 spin_unlock_irq(q->queue_lock);
140 140
141 if (drain) 141 if (drain)
142 __blk_mq_drain_queue(q); 142 blk_mq_drain_queue(q);
143}
144
145void blk_mq_drain_queue(struct request_queue *q)
146{
147 __blk_mq_drain_queue(q);
148} 143}
149 144
150static void blk_mq_unfreeze_queue(struct request_queue *q) 145static void blk_mq_unfreeze_queue(struct request_queue *q)
@@ -883,7 +878,7 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx)
883 clear_bit(BLK_MQ_S_STOPPED, &hctx->state); 878 clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
884 879
885 preempt_disable(); 880 preempt_disable();
886 __blk_mq_run_hw_queue(hctx); 881 blk_mq_run_hw_queue(hctx, false);
887 preempt_enable(); 882 preempt_enable();
888} 883}
889EXPORT_SYMBOL(blk_mq_start_hw_queue); 884EXPORT_SYMBOL(blk_mq_start_hw_queue);