From: James Bottomley <James.Bottomley@SteelEye.com>
To: Anton Blanchard <anton@samba.org>
Cc: Dipankar Sarma <dipankar@in.ibm.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
stern@rowland.harvard.edu
Subject: Re: [2.6.14-rc1] sym scsi boot hang
Date: Wed, 14 Sep 2005 12:57:42 -0400 [thread overview]
Message-ID: <1126717062.4584.4.camel@mulgrave> (raw)
In-Reply-To: <20050914080629.GB19051@krispykreme>
On Wed, 2005-09-14 at 18:06 +1000, Anton Blanchard wrote:
> And in particular it looks like the scsi_unprep_request in
> scsi_queue_insert is causing it. The following patch fixes the boot
> problems on the vscsi machine:
OK, my fault. Your fix is almost correct .. I was going to do this
eventually, honest, because there's no need to unprep and reprep a
command that comes in through scsi_queue_insert().
However, I decided to leave it in to exercise the scsi_unprep_request()
path just to make sure it was working. What's happening, I think, is
that we also use this path for retries. Since we kill and reget the
command each time, the retries decrement is never seen, so we're
retrying forever.
This should be the correct reversal.
James
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -140,14 +140,12 @@ static void scsi_unprep_request(struct r
* commands.
* Notes: This could be called either from an interrupt context or a
* normal process context.
- * Notes: Upon return, cmd is a stale pointer.
*/
int scsi_queue_insert(struct scsi_cmnd *cmd, int reason)
{
struct Scsi_Host *host = cmd->device->host;
struct scsi_device *device = cmd->device;
struct request_queue *q = device->request_queue;
- struct request *req = cmd->request;
unsigned long flags;
SCSI_LOG_MLQUEUE(1,
@@ -188,9 +186,8 @@ int scsi_queue_insert(struct scsi_cmnd *
* function. The SCSI request function detects the blocked condition
* and plugs the queue appropriately.
*/
- scsi_unprep_request(req);
spin_lock_irqsave(q->queue_lock, flags);
- blk_requeue_request(q, req);
+ blk_requeue_request(q, cmd->request);
spin_unlock_irqrestore(q->queue_lock, flags);
scsi_run_queue(q);
next prev parent reply other threads:[~2005-09-14 19:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-13 12:48 [2.6.14-rc1] sym scsi boot hang Dipankar Sarma
2005-09-13 13:17 ` Anton Blanchard
2005-09-13 14:29 ` Anton Blanchard
2005-09-13 16:35 ` James Bottomley
2005-09-13 16:47 ` Anton Blanchard
2005-09-13 17:32 ` James Bottomley
2005-09-13 17:13 ` Anton Blanchard
2005-09-13 17:33 ` Dipankar Sarma
2005-09-14 8:06 ` Anton Blanchard
2005-09-14 15:49 ` Alan Stern
2005-09-14 16:52 ` Mike Christie
2005-09-14 16:53 ` Mike Christie
2005-09-14 20:35 ` James Bottomley
2005-09-14 16:57 ` James Bottomley [this message]
2005-09-14 20:19 ` Alan Stern
2005-09-14 20:44 ` James Bottomley
2005-09-14 21:33 ` Alan Stern
2005-09-15 13:56 ` James Bottomley
2005-09-15 14:13 ` Alan Stern
2005-09-15 17:52 ` Alan Stern
2005-09-16 10:28 ` Anton Blanchard
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=1126717062.4584.4.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=anton@samba.org \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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