Re: [PATCH] fix scsi cmnd retries in error handling

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

 



On Mon, Nov 1, 2010 at 9:38 PM, James Bottomley <James.Bottomley@xxxxxxx> wrote:
> On Mon, 2010-11-01 at 21:02 +0800, Hillf Danton wrote:
>> There are two instances of increment and test of retries of scsi cmnd
>> in functions scsi_decide_disposition() and scsi_eh_flush_done_q()
>> respectively.
>
> This analysis is incomplete. ÂThose two functions are called in

Though incomplete, there is chance they could be threaded up by
scsi_unjam_host(). //Hillf

> completely separate paths, so you can't remove the increment from one
> and expect the other to compensate.
>
> James
>
>> One of the increments is overwork when the corresponding cmnds are same.
>> The overwork is fixed in scsi_decide_disposition().
>>
>> Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
>> ---
>>
>> --- a/drivers/scsi/scsi_error.c    2010-09-13 07:07:38.000000000 +0800
>> +++ b/drivers/scsi/scsi_error.c    2010-11-01 20:39:38.000000000 +0800
>> @@ -1541,7 +1541,7 @@ int scsi_decide_disposition(struct scsi_
>> Â Â Â Â* the request was not marked fast fail. ÂNote that above,
>> Â Â Â Â* even if the request is marked fast fail, we still requeue
>> Â Â Â Â* for queue congestion conditions (QUEUE_FULL or BUSY) */
>> - Â Â if ((++scmd->retries) <= scmd->allowed
>> + Â Â if (scmd->retries < scmd->allowed
>> Â Â Â Â Â && !scsi_noretry_cmd(scmd)) {
>> Â Â Â Â Â Â Â return NEEDS_RETRY;
>> Â Â Â } else {
>> --
>> 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
>
>
>
--
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