summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2017-06-29 11:13:43 +0300
committerSagi Grimberg <sagi@grimberg.me>2017-07-04 09:44:16 +0300
commit4368c39bf6e6a2bfffb7a72d78912c68f156e8da (patch)
tree106242fb0ef3a769bd81360c03c4090d6f630104 /drivers/nvme
parent4c8b99f6b1ff086c1745fcb0511800fba5c4fb34 (diff)
downloadtalos-obmc-linux-4368c39bf6e6a2bfffb7a72d78912c68f156e8da.tar.gz
talos-obmc-linux-4368c39bf6e6a2bfffb7a72d78912c68f156e8da.zip
nvme-loop: 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 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/target/loop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index 568ed8625696..3d51341e62ee 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -508,6 +508,9 @@ static void nvme_loop_reset_ctrl_work(struct work_struct *work)
if (ret)
goto out_destroy_io;
+ blk_mq_update_nr_hw_queues(&ctrl->tag_set,
+ ctrl->ctrl.queue_count - 1);
+
changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
WARN_ON_ONCE(!changed);
OpenPOWER on IntegriCloud