nvme-rdma: reuse nvme_delete_ctrl when reconnect attempts expire
Subsystems (2)
Sagi Grimberg
maintainerPATCH 1/2 nvme-rdma: reuse nvme_delete_ctrl when reconnect attempts expire
instead of just queueing delete work
Reported-by Christoph Hellwig <hch at lst.de>
Signed-off-by Sagi Grimberg <sagi at grimberg.me>
--- drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/rdma.c +1 -1
@@ -912,7 +912,7 @@ static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl) ctrl->ctrl.opts->reconnect_delay * HZ); }else {dev_info (ctrl->ctrl.device,"Removing controller...\n" ); -queue_work (nvme_wq, &ctrl->ctrl.delete_work); +nvme_delete_ctrl (&ctrl->ctrl); } }
Signature · 1 line
2.7.4
Sagi Grimberg
maintainerPATCH 2/2 nvme-core: flush reset_work before safely continuing with delete operation
Prevent racing controller reset and delete flows. reset_work must not ever self-requeue so flushing it suffices.
Reported-by Christoph Hellwig <hch at lst.de>
Signed-off-by Sagi Grimberg <sagi at grimberg.me>
--- drivers/nvme/host/core.c | 1 + drivers/nvme/host/fc.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -0
@@ -102,6 +102,7 @@ static void nvme_delete_ctrl_work(struct work_struct *work)struct nvme_ctrl *ctrl = container_of(work, struct nvme_ctrl, delete_work); +flush_work (&ctrl->reset_work);nvme_stop_ctrl (ctrl);nvme_remove_namespaces (ctrl); ctrl->ops->delete_ctrl (ctrl);
drivers/nvme/host/fc.c +0 -1
@@ -2655,7 +2655,6 @@ nvme_fc_delete_ctrl(struct nvme_ctrl *nctrl) {struct nvme_fc_ctrl *ctrl =to_fc_ctrl (nctrl); -cancel_work_sync (&ctrl->ctrl.reset_work);cancel_delayed_work_sync (&ctrl->connect_work);/* * kill the association on the link side. this will block
Signature · 1 line
2.7.4
PATCH 1/2 nvme-rdma: reuse nvme_delete_ctrl when reconnect attempts expire
In reply to Sagi GrimbergThanks, applied both patches to nvme-4.15.