Re: [Open-FCoE] [PATCH] libfc: fix error handling in fc_exch_rrq_resp()

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

 



On Mon, Oct 25, 2010 at 2:20 PM, Joe Eykholt <jeykholt@xxxxxxxxx> wrote:
> <dropped scsi alias>
>
> On 10/23/10 12:56 AM, Hillf Danton wrote:
>>
>> On Sat, Oct 23, 2010 at 2:57 AM, Joe Eykholt<jeykholt@xxxxxxxxx> Âwrote:
>>>
>>>
>>> On 10/22/10 8:21 AM, Hillf Danton wrote:
>>>>
>>>> There seems no cleanup left when FC_EX_CLOSED encountered, which may
>>>> be from fc_exch_reset().
>>>
>>> Are you sure? ÂIt seems that the RRQ exchange has a hold on another
>>> exchange, the one that's the subject of the RRQ. ÂThat exchange
>>
>> In case of fc_exch_pool_reset(), each exch on ex_list is delivered to
>> fc_exch_reset(), Âso "another" and "that" exch are treated in same way.
>
> True, but nothing else is going to release the other exchange.

Here is snippet from fc_exch_reset(),

	if (ep->esb_stat & ESB_ST_REC_QUAL)
		atomic_dec(&ep->ex_refcnt);	/* drop hold for rec_qual */
	ep->esb_stat &= ~ESB_ST_REC_QUAL;

the hold does get dropped, based upon which it looks the cleanup in
fc_exch_reset() gets no more work left for response-handler.

>
>> After cleanup, then the resp handler, if attached, is issued with
>> FC_EX_CLOSED,
>> so no more work left for the resp handler.
>>
>> If still needed, overwork occurs before calling resp handler.
>
> This happens so infrequently that the amount of extra work, if any,
> is not significant.
>
>>> still needs to be released. ÂI could be wrong, it's been a while.
>>>
>>>> Signed-off-by: Hillf Danton<dhillf@xxxxxxxxx>
>>>> ---
>>>>
>>>> --- a/drivers/scsi/libfc/fc_exch.c  Â2010-09-13 07:07:38.000000000
>>>> +0800
>>>> +++ b/drivers/scsi/libfc/fc_exch.c  Â2010-10-22 23:17:50.000000000
>>>> +0800
>>>> @@ -1827,7 +1827,9 @@ static void fc_exch_rrq_resp(struct fc_s
>>>> Â Â Â if (IS_ERR(fp)) {
>>>> Â Â Â Â Â Â Â int err = PTR_ERR(fp);
>>>>
>>>> - Â Â Â Â Â Â if (err == -FC_EX_CLOSED || err == -FC_EX_TIMEOUT)
>>>> + Â Â Â Â Â Â if (err == -FC_EX_CLOSED)
>>>> + Â Â Â Â Â Â Â Â Â Â return;
>>>> + Â Â Â Â Â Â if (err == -FC_EX_TIMEOUT)
>>>> Â Â Â Â Â Â Â Â Â Â Â goto cleanup;
>>>> Â Â Â Â Â Â Â FC_EXCH_DBG(aborted_ep, "Cannot process RRQ, "
>>>> Â Â Â Â Â Â Â Â Â Â Â Â Â "frame error %d\n", err);
>>>> _______________________________________________
>>>> devel mailing list
>>>> devel@xxxxxxxxxxxxx
>>>> http://www.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