Thread (69 messages) 69 messages, 5 authors, 2017-07-10

Re: [PATCH rfc 08/30] nvme-rdma: cleanup error path in controller reset

From: James Smart <hidden>
Date: 2017-07-10 18:57:12
Also in: linux-nvme

On 6/18/2017 8:21 AM, Sagi Grimberg wrote:
quoted hunk ↗ jump to hunk
No need to queue an extra work to indirect controller
uninit and put the final reference.


  static void nvme_rdma_del_ctrl_work(struct work_struct *work)
  {
  	struct nvme_rdma_ctrl *ctrl = container_of(work,
  				struct nvme_rdma_ctrl, delete_work);
  
-	__nvme_rdma_remove_ctrl(ctrl, true);
+	nvme_uninit_ctrl(&ctrl->ctrl);
+	nvme_rdma_shutdown_ctrl(ctrl, true);
+	nvme_put_ctrl(&ctrl->ctrl);
  }
  
  static int __nvme_rdma_del_ctrl(struct nvme_rdma_ctrl *ctrl)
@@ -1791,14 +1784,6 @@ static int nvme_rdma_del_ctrl(struct nvme_ctrl *nctrl)
  	return ret;
  }
  
...
quoted hunk ↗ jump to hunk
@@ -1832,10 +1814,13 @@ static void nvme_rdma_reset_ctrl_work(struct work_struct *work)
  
  	return;
  
-del_dead_ctrl:
-	/* Deleting this dead controller... */
+out_destroy_io:
+	nvme_rdma_destroy_io_queues(ctrl, true);
+out_destroy_admin:
+	nvme_rdma_destroy_admin_queue(ctrl, true);
  	dev_warn(ctrl->ctrl.device, "Removing after reset failure\n");
-	WARN_ON(!queue_work(nvme_wq, &ctrl->delete_work));
+	nvme_uninit_ctrl(&ctrl->ctrl);
+	nvme_put_ctrl(&ctrl->ctrl);
  }
  
  static const struct nvme_ctrl_ops nvme_rdma_ctrl_ops = {
Recommend calls to nvme_stop_keep_alive() prior to nvme_uninit_ctrl().

-- james
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help