All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hillf Danton <dhillf@gmail.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] fix scsi cmnd retries in error handling
Date: Mon, 1 Nov 2010 21:53:28 +0800	[thread overview]
Message-ID: <AANLkTikgNf=+7cWH0L3uUA5jMH88q4hEp3G+GWRdnyLm@mail.gmail.com> (raw)
In-Reply-To: <1288618715.3056.21.camel@mulgrave.site>

On Mon, Nov 1, 2010 at 9:38 PM, James Bottomley <James.Bottomley@suse.de> 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@gmail.com>
>> ---
>>
>> --- 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@vger.kernel.org
>> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-11-01 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-01 13:02 [PATCH] fix scsi cmnd retries in error handling Hillf Danton
2010-11-01 13:38 ` James Bottomley
2010-11-01 13:53   ` Hillf Danton [this message]
2010-12-01 14:09   ` Hillf Danton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTikgNf=+7cWH0L3uUA5jMH88q4hEp3G+GWRdnyLm@mail.gmail.com' \
    --to=dhillf@gmail.com \
    --cc=James.Bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.