Re: [PATCH 2/3] scsi_dh_alua: Do not retry for unmapped device

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

 



On Fri, 2017-04-28 at 15:06 +0200, Martin Wilck wrote:
> From: Hannes Reinecke <hare@xxxxxxx>
> 
> If a device becomes unmapped on the target we should be returning
> SCSI_DH_DEV_OFFLINED.
> 
> Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
> Reviewed-by: Martin Wilck <mwilck@xxxxxxxx>

Hello Hannes and Martin,

Have you considered to add "Cc: stable" to this patch and other patches in
this series?

> 
>  		 * Retry on ALUA state transition or if any
>  		 * UNIT ATTENTION occurred.
> @@ -576,6 +576,9 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
>  		if (sense_hdr.sense_key == NOT_READY &&
>  		    sense_hdr.asc == 0x04 && sense_hdr.ascq == 0x0a)
>  			err = SCSI_DH_RETRY;
> +		if (sense_hdr.sense_key == ILLEGAL_REQUEST &&
> +		    sense_hdr.asc == 0x25 && sense_hdr.ascq == 0x00)
> +			err = SCSI_DH_DEV_OFFLINED;
>  		else if (sense_hdr.sense_key == UNIT_ATTENTION)
>  			err = SCSI_DH_RETRY;

Please be consistent in the code that checks the sense codes - either use
"else if" for the test that has been added or changed the existing "else if"
into "if". Otherwise this patch looks fine to me.

Thanks,

Bart.



[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