Re: [Open-FCoE] [PATCH] fix computation related to FC_EX_CLOSED in FC local port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 17, 2010 at 4:05 AM, Vasu Dev <vasu.dev@xxxxxxxxxxxxxxx> wrote:
> On Thu, 2010-12-16 at 23:54 +0800, Hillf Danton wrote:
>> In fc_lport_error(), FC_EX_CLOSED could be understood to be no more
>> rettries, so resetting local port is reasonable and necessary.
>>
>
> It is not reasonable/necessary in this case as FC_EX_CLOSED is issued on
> lport reset thru exch block reset called there, so doing lport reset
> again in same call flow is not needed unless I'm missing something to do
> reset again here. Are hitting any bug which got fixed by this patch ?
>
Umm..why could lport reset then when no more retries, first?
And how about the state machine of lport then if nothing done, second?

It looks not buggy, I think.
>
>> When processing response to flogi request, FC_EX_CLOSED should be
>> treated as other errors, since the state machine of local port could
>> reach reset.
>>
>> Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
>> ---
>>
>> --- a/drivers/scsi/libfc/fc_lport.c  2010-11-01 19:54:12.000000000 +0800
>> +++ b/drivers/scsi/libfc/fc_lport.c  2010-12-16 23:46:06.000000000 +0800
>> @@ -1013,7 +1013,7 @@ static void fc_lport_error(struct fc_lpo
>> Â Â Â Â Â Â Â Â Â Âlport->retry_count);
>>
>> Â Â Â if (PTR_ERR(fp) == -FC_EX_CLOSED)
>> - Â Â Â Â Â Â return;
>> + Â Â Â Â Â Â goto reset;
>>
>> Â Â Â /*
>> Â Â Â Â* Memory allocation failure, or the exchange timed out
>> @@ -1029,6 +1029,7 @@ static void fc_lport_error(struct fc_lpo
>>
>> Â Â Â Â Â Â Â schedule_delayed_work(&lport->retry_work, delay);
>> Â Â Â } else
>> + reset:
>> Â Â Â Â Â Â Â fc_lport_enter_reset(lport);
>> Â}
>>
>> @@ -1428,9 +1429,6 @@ void fc_lport_flogi_resp(struct fc_seq *
>>
>> Â Â Â FC_LPORT_DBG(lport, "Received a FLOGI %s\n", fc_els_resp_type(fp));
>>
>> - Â Â if (fp == ERR_PTR(-FC_EX_CLOSED))
>> - Â Â Â Â Â Â return;
>> -
>
> Like other resp handlers in lport.c, above code is required instead just
> removing for Âfc_lport_flogi_resp, this is to allow exch clean up on
> exch block reset.
First, this error could be processed correctly after lock.
And it could be also processed with more cares not only in the above
error handler.

And the state machine of lport is the major concern of the patch,
simply returning
helps little.

Cheers
Hillf

>
> Â Â Â ÂVasu
>
>> Â Â Â mutex_lock(&lport->lp_mutex);
>>
>> Â Â Â if (lport->state != LPORT_ST_FLOGI) {
>> _______________________________________________
>> devel mailing list
>> devel@xxxxxxxxxxxxxxxxxxx
>> https://lists.open-fcoe.org/mailman/listinfo/devel
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux