Commit 7a148c2f authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe

block: don't call blk_mq_quiesce_queue() after queue is frozen

After queue is frozen, no request in this queue can be in use at all, so
there can't be any .queue_rq() running on this queue.  It isn't
necessary to call blk_mq_quiesce_queue() any more, so remove it in both
elevator_switch_mq() and blk_mq_update_nr_requests().

Cc: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>

Fixed up the description a bit.
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent d6296d39
...@@ -2609,7 +2609,6 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr) ...@@ -2609,7 +2609,6 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
return -EINVAL; return -EINVAL;
blk_mq_freeze_queue(q); blk_mq_freeze_queue(q);
blk_mq_quiesce_queue(q);
ret = 0; ret = 0;
queue_for_each_hw_ctx(q, hctx, i) { queue_for_each_hw_ctx(q, hctx, i) {
...@@ -2635,7 +2634,6 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr) ...@@ -2635,7 +2634,6 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
q->nr_requests = nr; q->nr_requests = nr;
blk_mq_unfreeze_queue(q); blk_mq_unfreeze_queue(q);
blk_mq_start_stopped_hw_queues(q, true);
return ret; return ret;
} }
......
...@@ -950,7 +950,6 @@ static int elevator_switch_mq(struct request_queue *q, ...@@ -950,7 +950,6 @@ static int elevator_switch_mq(struct request_queue *q,
int ret; int ret;
blk_mq_freeze_queue(q); blk_mq_freeze_queue(q);
blk_mq_quiesce_queue(q);
if (q->elevator) { if (q->elevator) {
if (q->elevator->registered) if (q->elevator->registered)
...@@ -978,9 +977,7 @@ static int elevator_switch_mq(struct request_queue *q, ...@@ -978,9 +977,7 @@ static int elevator_switch_mq(struct request_queue *q,
out: out:
blk_mq_unfreeze_queue(q); blk_mq_unfreeze_queue(q);
blk_mq_start_stopped_hw_queues(q, true);
return ret; return ret;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment