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

James Smart jsmart2021 at gmail.com
Fri May 21 13:48:24 PDT 2021


On 5/21/2021 1:17 PM, Sagi Grimberg wrote:
> 
>>       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>
> 

Agree with Sagi that the print should have the status.

Reviewed-by:  James Smart <jsmart2021 at gmail.com>

-- james




More information about the Linux-nvme mailing list