public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@mbligh.org>
To: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: Arrr! Linux v2.6.14-rc2
Date: Tue, 20 Sep 2005 16:03:20 -0700	[thread overview]
Message-ID: <635500000.1127257400@flay> (raw)
In-Reply-To: <Pine.LNX.4.58.0509192003410.2553@g5.osdl.org>

> Ahoy landlubbers!
> 
> Here be t' Linux-2.6.14-rc2 release.
> 
> Not a whole lot o' excitement, ye scurvy dogs, but it has t' ALSA, LSM,
> audit and watchdog merges that be missed from -rc1, and a merge series
> with Andrew. But on t' whole pretty reasonable - you can see t' details in
> the shortlog (appended).
> 
> Arrr!

SCSI is broken in several cases by a lack of the patch below, which means 
some of the regular test boxes can't - James, any chance of getting that
one upstream? (it's cut and pasted, but then you wouldn't want to apply
it anyway without correct "flow" ;-)).

Thanks,

M.

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);

  parent reply	other threads:[~2005-09-20 23:03 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20  3:22 Arrr! Linux v2.6.14-rc2 Linus Torvalds
2005-09-20  3:44 ` Nick Piggin
2005-09-20  4:50 ` Gene Heskett
2005-09-20 13:31   ` Patrick McFarland
2005-09-20 14:05     ` Gene Heskett
2005-09-20 14:10       ` Russell King
2005-09-20 14:25         ` Gene Heskett
     [not found]           ` <56402.10.10.10.28.1127229646.squirrel@linux1>
2005-09-20 15:20             ` Sean
2005-09-20 20:45               ` Gene Heskett
2005-09-20 20:57               ` Gene Heskett
2005-09-20 21:00                 ` Matthew Dharm
2005-09-20 21:23                   ` Gene Heskett
2005-09-20 21:39               ` Gene Heskett
2005-09-21 16:50               ` Gene Heskett
2005-09-21 18:28               ` Bill Davidsen
     [not found]                 ` <44442.10.10.10.28.1127329602.squirrel@linux1>
2005-09-21 19:06                   ` Sean
2005-09-20 15:29             ` Russell King
2005-09-20 15:32             ` Alexander Nyberg
     [not found]               ` <54562.10.10.10.28.1127230800.squirrel@linux1>
2005-09-20 15:40                 ` Sean
2005-09-20 16:18                   ` Jan Dittmer
     [not found]                     ` <36267.10.10.10.28.1127233614.squirrel@linux1>
2005-09-20 16:26                       ` Sean
2005-09-20 16:44                         ` Jan Dittmer
     [not found]                           ` <48312.10.10.10.28.1127235046.squirrel@linux1>
2005-09-20 16:50                             ` Sean
2005-09-20 17:00                               ` Jan Dittmer
2005-09-20 17:02                               ` Linus Torvalds
     [not found]                                 ` <52797.10.10.10.28.1127236164.squirrel@linux1>
2005-09-20 17:09                                   ` Sean
     [not found]                                 ` <41938.10.10.10.28.1127252566.squirrel@linux1>
2005-09-20 21:42                                   ` using -gitX snapshot tags [was Re: Arrr! Linux v2.6.14-rc2] Sean
2005-09-20 17:09                             ` Arrr! Linux v2.6.14-rc2 Alexey Dobriyan
2005-09-20 17:59             ` Horst von Brand
     [not found]               ` <59258.10.10.10.28.1127241246.squirrel@linux1>
2005-09-20 18:34                 ` Sean
2005-09-20 18:48                 ` Russell King
2005-09-21  0:43               ` Gene Heskett
2005-09-21 18:22         ` Bill Davidsen
2005-09-20 23:03 ` Martin J. Bligh [this message]
2005-09-20 23:11   ` Nish Aravamudan
2005-09-20 23:12   ` James Bottomley
2005-09-20 23:13     ` Martin J. Bligh
2005-09-21 22:51       ` Martin J. Bligh

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=635500000.1127257400@flay \
    --to=mbligh@mbligh.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox