From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/3] SCSI: rearrange code in scsi_io_completion
Date: Tue, 30 Sep 2008 09:41:45 -0500 [thread overview]
Message-ID: <1222785705.3232.18.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0809291710390.4420-100000@iolanthe.rowland.org>
On Mon, 2008-09-29 at 17:11 -0400, Alan Stern wrote:
> This patch (as1142) consolidates some repetitious code in
> scsi_io_completion(). Multiple calls to scsi_end_request() and to
> scsi_requeue_command() are combined together and moved to the end of
> the function.
>
> This is simple mechanical code motion, with no change in behavior.
I don't really think this is the right approach, since the retry case
needs to be split apart again.
The only time scsi_requeue_command() needs to be called is if the
request completes successfully but has leftovers. The reason is that
the command will be different next time around, so it has to be
re-prepared. In all the other cases, the same command can be reused.
This will have the knock on effect of not resetting the timers or the
counters, so it has to be done carefully.
Of the three requeue cases:
UNIT_ATTENTION needs immediate retry
NOT_READY needs delayed retry
ILLEGAL_REQUEST with cmd switch (assuming we still do it) needs
immediate retry
DID_RESET is arguable either way, but probably needs delayed.
immediate requeue is done by:
scsi_queue_insert(cmd, SCSI_MLQUEUE_EH_RETRY);
And delayed by
scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);
James
next prev parent reply other threads:[~2008-09-30 14:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 21:11 [PATCH 1/3] SCSI: rearrange code in scsi_io_completion Alan Stern
2008-09-30 14:41 ` James Bottomley [this message]
2008-09-30 15:08 ` Alan Stern
2008-09-30 15:43 ` James Bottomley
2008-09-30 17:11 ` Mike Anderson
2008-09-30 18:07 ` James Bottomley
2008-09-30 19:34 ` Alan Stern
2008-09-30 19:49 ` Alan Stern
2008-09-30 23:24 ` Martin K. Petersen
2008-10-01 13:50 ` Alan Stern
2008-10-01 14:08 ` Douglas Gilbert
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=1222785705.3232.18.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox