Skip to content

Commit 88e837e

Browse files
James SmartChristoph Hellwig
authored andcommitted
nvme-fc: wait for queues to freeze before calling update_hr_hw_queues
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 <james.smart@broadcom.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 514a6dc commit 88e837e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • drivers/nvme/host

drivers/nvme/host/fc.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,11 +2885,14 @@ nvme_fc_recreate_io_queues(struct nvme_fc_ctrl *ctrl)
28852885
if (ret)
28862886
goto out_delete_hw_queues;
28872887

2888-
if (prior_ioq_cnt != nr_io_queues)
2888+
if (prior_ioq_cnt != nr_io_queues) {
28892889
dev_info(ctrl->ctrl.device,
28902890
"reconnect: revising io queue count from %d to %d\n",
28912891
prior_ioq_cnt, nr_io_queues);
2892-
blk_mq_update_nr_hw_queues(&ctrl->tag_set, nr_io_queues);
2892+
nvme_wait_freeze(&ctrl->ctrl);
2893+
blk_mq_update_nr_hw_queues(&ctrl->tag_set, nr_io_queues);
2894+
nvme_unfreeze(&ctrl->ctrl);
2895+
}
28932896

28942897
return 0;
28952898

0 commit comments

Comments
 (0)