All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian King <brking@us.ibm.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Christoph Hellwig <hch@infradead.org>,
	James Bottomley <James.Bottomley@steeleye.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] Re: sleeping in scsi EH
Date: Fri, 27 May 2005 09:35:37 -0500	[thread overview]
Message-ID: <42973039.30005@us.ibm.com> (raw)
In-Reply-To: <20050527141718.GD14929@parcelfarce.linux.theplanet.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

Matthew Wilcox wrote:
> On Fri, May 27, 2005 at 09:10:58AM -0500, Brian King wrote:
> 
>>diff -puN drivers/scsi/ipr.c~ipr_abort_locking drivers/scsi/ipr.c
>>--- linux-2.6.12-rc5/drivers/scsi/ipr.c~ipr_abort_locking	2005-05-27 08:57:49.000000000 -0500
>>+++ linux-2.6.12-rc5-bjking1/drivers/scsi/ipr.c	2005-05-27 09:00:48.000000000 -0500
>>@@ -3069,6 +3069,11 @@ static int ipr_cancel_op(struct scsi_cmn
>> 	ioa_cfg = (struct ipr_ioa_cfg *)scsi_cmd->device->host->hostdata;
>> 	res = scsi_cmd->device->hostdata;
>> 
>>+	/* If we are currently going through reset/reload, return failed. This will force the
>>+	   mid-layer to call ipr_eh_host_reset, which will then go to sleep and wait for the
>>+	   reset to complete */
>>+	if (ioa_cfg->in_reset_reload || ioa_cfg->ioa_is_dead)
>>+		return FAILED;
> 
> 
> I appreciate you've only moved this comment from elsewhere, but could
> you reformat it to fewer than 80 columns please?
> 

Here is a new patch with the comment changed to fit in 80 columns.


-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

[-- Attachment #2: ipr_abort_locking.patch --]
[-- Type: text/plain, Size: 1681 bytes --]



Signed-off-by: Brian King <brking@us.ibm.com>
---

 linux-2.6.12-rc5-bjking1/drivers/scsi/ipr.c |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff -puN drivers/scsi/ipr.c~ipr_abort_locking drivers/scsi/ipr.c
--- linux-2.6.12-rc5/drivers/scsi/ipr.c~ipr_abort_locking	2005-05-27 08:57:49.000000000 -0500
+++ linux-2.6.12-rc5-bjking1/drivers/scsi/ipr.c	2005-05-27 09:34:17.000000000 -0500
@@ -3069,6 +3069,13 @@ static int ipr_cancel_op(struct scsi_cmn
 	ioa_cfg = (struct ipr_ioa_cfg *)scsi_cmd->device->host->hostdata;
 	res = scsi_cmd->device->hostdata;
 
+	/*
+	 * If we are currently going through reset/reload, return failed.
+	 * This will force the mid-layer to call ipr_eh_host_reset, which
+	 * will then go to sleep and wait for the reset to complete
+	 */
+	if (ioa_cfg->in_reset_reload || ioa_cfg->ioa_is_dead)
+		return FAILED;
 	if (!res || (!ipr_is_gscsi(res) && !ipr_is_vset_device(res)))
 		return FAILED;
 
@@ -3119,22 +3126,10 @@ static int ipr_cancel_op(struct scsi_cmn
  **/
 static int ipr_eh_abort(struct scsi_cmnd * scsi_cmd)
 {
-	struct ipr_ioa_cfg *ioa_cfg;
 	unsigned long flags;
 	int rc;
 
 	ENTER;
-	ioa_cfg = (struct ipr_ioa_cfg *) scsi_cmd->device->host->hostdata;
-
-	/* If we are currently going through reset/reload, return failed. This will force the
-	   mid-layer to call ipr_eh_host_reset, which will then go to sleep and wait for the
-	   reset to complete */
-	if (ioa_cfg->in_reset_reload)
-		return FAILED;
-	if (ioa_cfg->ioa_is_dead)
-		return FAILED;
-	if (!scsi_cmd->device->hostdata)
-		return FAILED;
 
 	spin_lock_irqsave(scsi_cmd->device->host->host_lock, flags);
 	rc = ipr_cancel_op(scsi_cmd);
_

  reply	other threads:[~2005-05-27 14:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-27  2:26 sleeping in scsi EH Jeff Garzik
2005-05-27  7:09 ` Christoph Hellwig
2005-05-27  8:37   ` Jeff Garzik
2005-05-27  8:42     ` Christoph Hellwig
2005-05-27 10:45       ` [PATCH] " Jeff Garzik
2005-05-27 10:52         ` Christoph Hellwig
2005-05-27 17:53           ` Jeff Garzik
2005-05-27 14:10         ` Brian King
2005-05-27 14:17           ` Matthew Wilcox
2005-05-27 14:35             ` Brian King [this message]
2005-05-27 16:54           ` Jeff Garzik
2005-05-27 17:35             ` Brian King
2005-05-27 15:01         ` Luben Tuikov

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=42973039.30005@us.ibm.com \
    --to=brking@us.ibm.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=hch@infradead.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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.