RE: [PATCH] scsi_dh_alua: Re-enable STPG for unavailable ports

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

 



Bart,

> -----Original Message-----
> From: Bart Van Assche [mailto:bvanassche@xxxxxxx]
> Sent: Friday, June 22, 2012 3:50 AM
> To: linux-scsi; Moger, Babu; Hannes Reinecke
> Subject: [PATCH] scsi_dh_alua: Re-enable STPG for unavailable ports
> 
> A quote from SPC-4: "While in the unavailable primary target port
> asymmetric access state, the device server shall support those of
> the following commands that it supports while in the active/optimized
> state: [ ... ] d) SET TARGET PORT GROUPS; [ ... ]". Hence re-enable
> sending STPG to a target port group that is in the unavailable state.

Patch looks good. One concern, the spec also says..
==============================
The unavailable target port asymmetric access state is
intended for situations when the target port accessibility to a logical unit may be severely restricted due to SCSI
target device limitations (e.g., hardware errors). Therefore it may not be possible to transition from this state to
either the active/optimized, active/non-optimized or standby states.
=====================================================

What happens if we cannot transition to active/optimized, active/non-optimized or standby states.  
Are we going to loop forever?  From kernel side it looks ok.  We are going mark the path as failed.  
It depends on what the path checker from multipath is going to do.  Do you have any idea about it?

> 
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> Cc: Babu Moger <babu.moger@xxxxxxxxxx>
> Cc: Hannes Reinecke <hare@xxxxxxx>
> 
> ---
> This patch fixes a regression introduced in kernel 3.5-rc1.
> 
> ---
>  drivers/scsi/device_handler/scsi_dh_alua.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c
> b/drivers/scsi/device_handler/scsi_dh_alua.c
> index 5088209..155fadc 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -691,9 +691,9 @@ static int alua_activate(struct scsi_device *sdev,
>  				stpg = 0;
>  			break;
>  		case TPGS_STATE_STANDBY:
> +		case TPGS_STATE_UNAVAILABLE:
>  			stpg = 1;
>  			break;
> -		case TPGS_STATE_UNAVAILABLE:
>  		case TPGS_STATE_OFFLINE:
>  			err = SCSI_DH_IO;
>  			break;
--
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