Re: [PATCH 1/2] scsi_error: set DID_TIME_OUT correctly

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

 



On Fri, 2014-06-13 at 14:01 +0200, Hannes Reinecke wrote:
> Any callbacks in scsi_timeout_out() might return BLK_EH_RESET_TIMER,
> in which case we should leave the result alone and not set
> DID_TIME_OUT, as the command didn't actually timeout.
> 
> Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
> ---
>  drivers/scsi/scsi_error.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 47a1ffc..ff176a6 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -291,11 +291,11 @@ enum blk_eh_timer_return scsi_times_out(struct request *req)
>  		if (scsi_abort_command(scmd) == SUCCESS)
>  			return BLK_EH_NOT_HANDLED;
>  
> -	scmd->result |= DID_TIME_OUT << 16;
> -
> -	if (unlikely(rtn == BLK_EH_NOT_HANDLED &&
> -		     !scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD)))
> -		rtn = BLK_EH_HANDLED;
> +	if (unlikely(rtn == BLK_EH_NOT_HANDLED)) {
> +		scmd->result |= DID_TIME_OUT << 16;
> +		if (!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))
> +			rtn = BLK_EH_HANDLED;
> +	}
>  
>  	return rtn;
>  }

See Paolo's patch series which includes:

[PATCH v3 4/6] scsi_error: fix invalid setting of host byte

I think your patch won't apply after his.

-Ewan


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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