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

Sagi Grimberg sagi at grimberg.me
Fri May 21 13:17:31 PDT 2021


>   	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 at grimberg.me>



More information about the Linux-nvme mailing list