diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-06-29 11:10:44 +0300 |
---|---|---|
committer | Sagi Grimberg <sagi@grimberg.me> | 2017-07-04 09:44:16 +0300 |
commit | 4c8b99f6b1ff086c1745fcb0511800fba5c4fb34 (patch) | |
tree | 35afb364b00bb914b5a37e1924f1609c4064d339 /drivers/nvme | |
parent | 7314183d1d0c200def4d0f5a6d978d3b29d28813 (diff) | |
download | linux-4c8b99f6b1ff086c1745fcb0511800fba5c4fb34.tar.bz2 |
nvme-rdma: update tagset nr_hw_queues after reconnecting/resetting
We might have more/less queues once we reconnect/reset. For
example due to cpu going online/offline or controller constraints.
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/rdma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 2ab0cdb4d881..cfb22531fc16 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -741,6 +741,9 @@ static void nvme_rdma_reconnect_ctrl_work(struct work_struct *work) ret = nvme_rdma_connect_io_queues(ctrl); if (ret) goto requeue; + + blk_mq_update_nr_hw_queues(&ctrl->tag_set, + ctrl->ctrl.queue_count - 1); } changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE); @@ -1727,6 +1730,9 @@ static void nvme_rdma_reset_ctrl_work(struct work_struct *work) ret = nvme_rdma_connect_io_queues(ctrl); if (ret) goto del_dead_ctrl; + + blk_mq_update_nr_hw_queues(&ctrl->tag_set, + ctrl->ctrl.queue_count - 1); } changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE); |