]> Git Repo - linux.git/commitdiff
nvme-fc: wait for queues to freeze before calling update_hr_hw_queues
authorJames Smart <[email protected]>
Fri, 16 Oct 2020 21:17:24 +0000 (14:17 -0700)
committerChristoph Hellwig <[email protected]>
Fri, 23 Oct 2020 10:54:36 +0000 (12:54 +0200)
On reconnect, the code currently does not freeze the controller before
possibly updating the number hw queues for the controller.

Add the freeze before updating the number of hw queues.  Note: the queues
are already started and remain started through the reconnect.

Signed-off-by: James Smart <[email protected]>
Reviewed-by: Himanshu Madhani <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
drivers/nvme/host/fc.c

index 108130f140d022fe727a8d6bc760e7b2f79e7583..5f1d09640c40f194ee6361705258035ba4a35480 100644 (file)
@@ -2885,11 +2885,14 @@ nvme_fc_recreate_io_queues(struct nvme_fc_ctrl *ctrl)
        if (ret)
                goto out_delete_hw_queues;
 
-       if (prior_ioq_cnt != nr_io_queues)
+       if (prior_ioq_cnt != nr_io_queues) {
                dev_info(ctrl->ctrl.device,
                        "reconnect: revising io queue count from %d to %d\n",
                        prior_ioq_cnt, nr_io_queues);
-       blk_mq_update_nr_hw_queues(&ctrl->tag_set, nr_io_queues);
+               nvme_wait_freeze(&ctrl->ctrl);
+               blk_mq_update_nr_hw_queues(&ctrl->tag_set, nr_io_queues);
+               nvme_unfreeze(&ctrl->ctrl);
+       }
 
        return 0;
 
This page took 0.047554 seconds and 4 git commands to generate.