Thread (6 messages) 6 messages, 5 authors, 2021-05-25

Re: [PATCH] nvme/fc: Short-circuit reconnect retries

From: Sagi Grimberg <sagi@grimberg.me>
Date: 2021-05-21 20:18:09

quoted hunk ↗ jump to hunk
  	if (recon && nvmf_should_reconnect(&ctrl->ctrl)) {
@@ -3286,12 +3290,17 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)
  
  		queue_delayed_work(nvme_wq, &ctrl->connect_work, recon_delay);
  	} else {
-		if (portptr->port_state == FC_OBJSTATE_ONLINE)
-			dev_warn(ctrl->ctrl.device,
-				"NVME-FC{%d}: Max reconnect attempts (%d) "
-				"reached.\n",
-				ctrl->cnum, ctrl->ctrl.nr_reconnects);
-		else
+		if (portptr->port_state == FC_OBJSTATE_ONLINE) {
+			if (status > 0 && (status & NVME_SC_DNR))
+				dev_warn(ctrl->ctrl.device,
+					 "NVME-FC{%d}: reconnect failure\n",
Maybe worth to print the status here?

Otherwise looks good,
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help