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

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

From: Hannes Reinecke <hare@suse.de>
Date: 2021-05-22 09:49:34

On 5/21/21 10:17 PM, Sagi Grimberg wrote:
quoted
      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>
No need, as it's already printed by the previous message some lines 
above this code :-)

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

_______________________________________________
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