mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
nbd: quiesce request queues to make sure no submissions are inflight
Unlike blk_mq_stop_hw_queues, blk_mq_quiesce_queue respects the submission path rcu grace. quiesce the queue before iterating on live tags. Reviewed-by: Ming Lei <ming.lei@redhat.com> Acked-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
This commit is contained in:
parent
8d7b8fafad
commit
b52c2e9254
1 changed files with 2 additions and 2 deletions
|
@ -661,9 +661,9 @@ static void nbd_clear_req(struct request *req, void *data, bool reserved)
|
|||
|
||||
static void nbd_clear_que(struct nbd_device *nbd)
|
||||
{
|
||||
blk_mq_stop_hw_queues(nbd->disk->queue);
|
||||
blk_mq_quiesce_queue(nbd->disk->queue);
|
||||
blk_mq_tagset_busy_iter(&nbd->tag_set, nbd_clear_req, NULL);
|
||||
blk_mq_start_hw_queues(nbd->disk->queue);
|
||||
blk_mq_unquiesce_queue(nbd->disk->queue);
|
||||
dev_dbg(disk_to_dev(nbd->disk), "queue cleared\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue