nvme-fc: print proper nvme-fc devloss_tmo value
James Smart
Reviewed-byQuoted 19 lines · Martin George
From: Martin George <[email protected]>
The nvme-fc
devloss_tmois computed as the min of either thectrl_loss_tmo(max_retries*reconnect_delay) or the remote port'sdevloss_tmo. But what gets printed as the nvme-fcdevloss_tmoinnvme_fc_reconnect_or_delete()is always the remote port'sdevloss_tmovalue. So correct this by printing the min value instead.Signed-off-by Martin George <[email protected]>--- drivers/nvme/host/fc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/nvme/host/fc.c +0
-0
drivers/nvme/host/fc.c nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status) · line 3254
Quoted 10 lines
drivers/nvme/host/fc.c +3
-1@@ -3246,7 +3246,9 @@ nvme_fc_reconnect_or_delete(struct nvme_fc_ctrl *ctrl, int status)dev_warn (ctrl->ctrl.device,"NVME-FC{%d}: dev_loss_tmo (%d) expired " "while waiting for remoteport connectivity.\n" , - ctrl->cnum, portptr->dev_loss_tmo); + ctrl->cnum,min_t (int, portptr->dev_loss_tmo, + (ctrl->ctrl.opts->max_reconnects * + ctrl->ctrl.opts->reconnect_delay)));WARN_ON (nvme_delete_ctrl (&ctrl->ctrl)); } }
Thanks
-- james
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Thanks,
applied to nvme-5.8.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme