Re: [PATCH] Re: sleeping in scsi EH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Brian King <brking@xxxxxxxxxx>
---

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux