linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices
@ 2011-04-26 12:57 Martin George
  2011-04-26 21:24 ` Mike Christie
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Martin George @ 2011-04-26 12:57 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, Hannes Reinecke, Mike Christie

The SCSI ALUA handler currently fails to attach to devices
reporting an UNAVAILABLE/OFFLINE AAS. But given that an
UNAVAILABLE/OFFLINE AAS can transition to other states
like ACTIVE/OPTIMIZED, ACTIVE/NON-OPTIMIZED, etc. as per
SPC4, this ALUA handler behavior should be rectified so
as to attach to devices which also report an
UNAVAILABLE/OFFLINE AAS.

The below patch enables the same.

Signed-off-by: Martin George <marting@netapp.com>
---
 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 42fe529..6fec9fe 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -782,7 +782,7 @@ static int alua_bus_attach(struct scsi_device *sdev)
 	h->sdev = sdev;
 
 	err = alua_initialize(sdev, h);
-	if (err != SCSI_DH_OK)
+	if ((err != SCSI_DH_OK) && (err != SCSI_DH_DEV_OFFLINED))
 		goto failed;
 
 	if (!try_module_get(THIS_MODULE))
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices
  2011-04-26 12:57 [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices Martin George
@ 2011-04-26 21:24 ` Mike Christie
  2011-04-27  6:42 ` Nikanth Karthikesan
  2011-05-02  6:00 ` Hannes Reinecke
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Christie @ 2011-04-26 21:24 UTC (permalink / raw)
  To: Martin George; +Cc: James Bottomley, linux-scsi, Hannes Reinecke

On 04/26/2011 07:57 AM, Martin George wrote:
> The SCSI ALUA handler currently fails to attach to devices
> reporting an UNAVAILABLE/OFFLINE AAS. But given that an
> UNAVAILABLE/OFFLINE AAS can transition to other states
> like ACTIVE/OPTIMIZED, ACTIVE/NON-OPTIMIZED, etc. as per
> SPC4, this ALUA handler behavior should be rectified so
> as to attach to devices which also report an
> UNAVAILABLE/OFFLINE AAS.
>

This makes sense to me. It reports it supports alua, so it seems that we 
should attach.

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices
  2011-04-26 12:57 [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices Martin George
  2011-04-26 21:24 ` Mike Christie
@ 2011-04-27  6:42 ` Nikanth Karthikesan
  2011-05-02  6:00 ` Hannes Reinecke
  2 siblings, 0 replies; 4+ messages in thread
From: Nikanth Karthikesan @ 2011-04-27  6:42 UTC (permalink / raw)
  To: Martin George; +Cc: James Bottomley, linux-scsi, Hannes Reinecke, Mike Christie

On Tuesday, April 26, 2011 06:27:05 PM Martin George wrote:
> The SCSI ALUA handler currently fails to attach to devices
> reporting an UNAVAILABLE/OFFLINE AAS. But given that an
> UNAVAILABLE/OFFLINE AAS can transition to other states
> like ACTIVE/OPTIMIZED, ACTIVE/NON-OPTIMIZED, etc. as per
> SPC4, this ALUA handler behavior should be rectified so
> as to attach to devices which also report an
> UNAVAILABLE/OFFLINE AAS.
> 
> The below patch enables the same.
> 
> Signed-off-by: Martin George <marting@netapp.com>

Reviewed-by: Nikanth Karthikesan <nikanth@kernel.org>

Thanks
Nikanth

> ---
>  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 42fe529..6fec9fe 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -782,7 +782,7 @@ static int alua_bus_attach(struct scsi_device *sdev)
>  	h->sdev = sdev;
> 
>  	err = alua_initialize(sdev, h);
> -	if (err != SCSI_DH_OK)
> +	if ((err != SCSI_DH_OK) && (err != SCSI_DH_DEV_OFFLINED))
>  		goto failed;
> 
>  	if (!try_module_get(THIS_MODULE))

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices
  2011-04-26 12:57 [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices Martin George
  2011-04-26 21:24 ` Mike Christie
  2011-04-27  6:42 ` Nikanth Karthikesan
@ 2011-05-02  6:00 ` Hannes Reinecke
  2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2011-05-02  6:00 UTC (permalink / raw)
  To: Martin George; +Cc: James Bottomley, linux-scsi, Mike Christie

On 04/26/2011 02:57 PM, Martin George wrote:
> The SCSI ALUA handler currently fails to attach to devices
> reporting an UNAVAILABLE/OFFLINE AAS. But given that an
> UNAVAILABLE/OFFLINE AAS can transition to other states
> like ACTIVE/OPTIMIZED, ACTIVE/NON-OPTIMIZED, etc. as per
> SPC4, this ALUA handler behavior should be rectified so
> as to attach to devices which also report an
> UNAVAILABLE/OFFLINE AAS.
>
> The below patch enables the same.
>
> Signed-off-by: Martin George<marting@netapp.com>

Patch is correct. Even a path in state 'UNAVAILABLE' or 'OFFLINE'
responds to ALUA commands and thus should be handle by the alua
device_handler.

Acked-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-02  6:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 12:57 [PATCH] [SCSI] scsi_dh_alua: Attach to UNAVAILABLE/OFFLINE AAS devices Martin George
2011-04-26 21:24 ` Mike Christie
2011-04-27  6:42 ` Nikanth Karthikesan
2011-05-02  6:00 ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).