All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Edward Goggin <egoggin@vmware.com>
Cc: "'linux-scsi@vger.kernel.org'" <linux-scsi@vger.kernel.org>
Subject: Re: initialize max_target_blocked in scsi_alloc_target
Date: Tue, 28 Apr 2009 14:34:56 -0500	[thread overview]
Message-ID: <49F75A60.9090401@cs.wisc.edu> (raw)
In-Reply-To: <B1FD1A0C73AC4E46A4F95BADC77079D351A9E032@PA-EXMBX02.vmware.com>

Edward Goggin wrote:
> Patch 1 of 1
> 
> This patch initializes the max_target_blocked field of a scsi target structure
> so that a queuecommand return value of SCSI_MLQUEUE_TARGET_BUSY will actually
> result in having the scsi_queue_insert blocking the device queue before requeuing
> the command and running the queue.  Otherwise, can and does cause livelock on
> single CPU configurations if/when open-iSCSI software initiator's command PDU
> window fills.
> 
> Signed-off-by: Ed Goggin <egoggin@vmware.com>
> 
> --- linux-2.6.29/drivers/scsi/scsi_scan.c	2009-03-23 19:12:14.000000000 -0400
> +++ linux-2.6.29-fix/drivers/scsi/scsi_scan.c	2009-04-09 11:11:01.000000000 -0400
> @@ -427,6 +427,7 @@ static struct scsi_target *scsi_alloc_ta
>  	INIT_LIST_HEAD(&starget->devices);
>  	starget->state = STARGET_CREATED;
>  	starget->scsi_level = SCSI_2;
> +	starget->max_target_blocked = SCSI_DEFAULT_TARGET_BLOCKED;
>   retry:
>  	spin_lock_irqsave(shost->host_lock, flags);
> 

Hi James,

I see you picked up my patch to fix the q lock not being held:
http://marc.info/?l=linux-scsi&m=123931064705280&w=2

I think you need Ed's patch above too. Without it, target_blocked is 
always zero, so we never hit the code I fixed up. I tested his patch 
with my patch, and combined they fix all the issues here.

      parent reply	other threads:[~2009-04-28 19:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 17:02 initialize max_target_blocked in scsi_alloc_target Edward Goggin
2009-04-09 17:46 ` Mike Christie
2009-04-28 19:34 ` Mike Christie [this message]

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=49F75A60.9090401@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=egoggin@vmware.com \
    --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.