diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2016-07-31 17:43:15 +0200 |
---|---|---|
committer | Sagi Grimberg <sagi@grimberg.me> | 2016-08-03 15:25:03 +0200 |
commit | 5f372eb3e76317b4fe4ba53ad1547f39fc883350 (patch) | |
tree | e823a93cccc9e4b72ed8ada0d9896b0fc3fb7051 /drivers | |
parent | nvme-rdma: Don't leak uninitialized memory in connect request private data (diff) | |
download | linux-5f372eb3e76317b4fe4ba53ad1547f39fc883350.tar.xz linux-5f372eb3e76317b4fe4ba53ad1547f39fc883350.zip |
nvme-rdma: Queue ns scanning after a sucessful reconnection
On an ordered target shutdown, the target can send a AEN on a namespace
removal, this will trigger the host to queue ns-list query. The shutdown
will trigger error recovery which will attepmt periodic reconnect.
We can hit a race where the ns rescanning fails (error recovery kicked
in and we're not connected) causing removing all the namespaces and when
we reconnect we won't see any namespaces for this controller.
So, queue a namespace rescan after we successfully reconnected to the target.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/host/rdma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index b96b88369871..7fd1d735ced5 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -748,8 +748,10 @@ static void nvme_rdma_reconnect_ctrl_work(struct work_struct *work) changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE); WARN_ON_ONCE(!changed); - if (ctrl->queue_count > 1) + if (ctrl->queue_count > 1) { nvme_start_queues(&ctrl->ctrl); + nvme_queue_scan(&ctrl->ctrl); + } dev_info(ctrl->ctrl.device, "Successfully reconnected\n"); |