Skip to contentSkip to conversation

nvme-rdma: start async event handler after reconnecting to a controller

PATCH New Sagi Grimberg 2 participants 2 messages Aug 4, 2016 NVMe

lore
Share & tools
lore

Sagi Grimberg

author maintainer
#0 lore raw

PATCH 1/1 nvme-rdma: start async event handler after reconnecting to a controller

When we reset or reconnect to a controller, we are cancelling the async event handler so we can safely re-establish resources, but we need to remember to start it again when we successfully reconnect.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/rdma.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/nvme/host/rdma.c +2 -0
index 6378dc94aeaf..f2cf433f628d 100644
@@ -745,6 +745,7 @@ static void nvme_rdma_reconnect_ctrl_work(struct work_struct *work)
 	if (ctrl->queue_count > 1) {
 		nvme_start_queues(&ctrl->ctrl);
 		nvme_queue_scan(&ctrl->ctrl);
+		nvme_queue_async_events(&ctrl->ctrl);
 	}
 
 	dev_info(ctrl->ctrl.device, "Successfully reconnected\n");
@@ -1747,6 +1748,7 @@ static void nvme_rdma_reset_ctrl_work(struct work_struct *work)
 	if (ctrl->queue_count > 1) {
 		nvme_start_queues(&ctrl->ctrl);
 		nvme_queue_scan(&ctrl->ctrl);
+		nvme_queue_async_events(&ctrl->ctrl);
 	}
 
 	return;
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 nvme-rdma: start async event handler after reconnecting to a controller

Quoted 5 lines · Sagi Grimberg

When we reset or reconnect to a controller, we are cancelling the async event handler so we can safely re-establish resources, but we need to remember to start it again when we successfully reconnect.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>

Looks fine:

Reviewed-by Christoph Hellwig <hch at lst.de>

We'll also need an equivalent for the loop driver I think.