Skip to contentSkip to conversation

scsi_dh_alua: Enable STPG for unavailable ports

PATCH In review Bart Van Assche 4 participants 5 messages Aug 24, 2012 – Sep 20, 2012 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_dh_alua: 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 enable sending STPG to a target port group that is in the unavailable state.

Cc Hannes Reinecke <[email protected]>
Cc Mike Christie <[email protected]>
Cc Mike Snitzer <[email protected]>
Cc Babu Moger <[email protected]>
---
 drivers/scsi/device_handler/scsi_dh_alua.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/scsi/device_handler/scsi_dh_alua.c +1 -2
index 08d80a6..a05d469 100644
@@ -641,8 +641,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
 		h->state = TPGS_STATE_STANDBY;
 		break;
 	case TPGS_STATE_OFFLINE:
-	case TPGS_STATE_UNAVAILABLE:
-		/* Path unusable for unavailable/offline */
+		/* Path unusable */
 		err = SCSI_DH_DEV_OFFLINED;
 		break;
 	default:
Signature · 1 line
1.7.7
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Bart Van Assche
drivers/scsi/device_handler/scsi_dh_alua.c +0 -0
index 08d80a6..a05d469 100644

drivers/scsi/device_handler/scsi_dh_alua.c static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) · line 647

Quoted 9 lines
drivers/scsi/device_handler/scsi_dh_alua.c +1 -2
@@ -641,8 +641,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
 		h->state = TPGS_STATE_STANDBY;
 		break;
 	case TPGS_STATE_OFFLINE:
-	case TPGS_STATE_UNAVAILABLE:
-		/* Path unusable for unavailable/offline */
+		/* Path unusable */
 		err = SCSI_DH_DEV_OFFLINED;
 		break;
 	default:

We must not have tested unavailable state very much. 3rd bug in a short time. Looks ok to me.

#2 lore raw
In reply to Bart Van Assche
Quoted 22 lines · Bart Van Assche

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 enable sending STPG to a target port group that is in the unavailable state.

Cc Hannes Reinecke <[email protected]>
Cc Mike Christie <[email protected]>
Cc Mike Snitzer <[email protected]>
Cc Babu Moger <[email protected]>
---
 drivers/scsi/device_handler/scsi_dh_alua.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/scsi/device_handler/scsi_dh_alua.c +0 -0
index 08d80a6..a05d469 100644

drivers/scsi/device_handler/scsi_dh_alua.c static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) · line 647

Quoted 9 lines
drivers/scsi/device_handler/scsi_dh_alua.c +1 -2
@@ -641,8 +641,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
 		h->state = TPGS_STATE_STANDBY;
 		break;
 	case TPGS_STATE_OFFLINE:
-	case TPGS_STATE_UNAVAILABLE:
-		/* Path unusable for unavailable/offline */
+		/* Path unusable */
 		err = SCSI_DH_DEV_OFFLINED;
 		break;
 	default:

Hey, was this patch ok Hannes and James and others?

I see bb2c94a3a6ad37fe7d34f369295bcdf5387e264f was merged, but this one was not.

I was thinking this might have got missed because it has the same patch description as bb2c94a3a6ad37fe7d34f369295bcdf5387e264f, so it is confusion, but they are different patches. One fixes alua_rtpg and one fixes alua_activate, but both are needed.

#3 lore raw
Quoted 35 lines · Mike Christie
Quoted 22 lines · Bart Van Assche

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 enable sending STPG to a target port group that is in the unavailable state.

Cc Hannes Reinecke <[email protected]>
Cc Mike Christie <[email protected]>
Cc Mike Snitzer <[email protected]>
Cc Babu Moger <[email protected]>
---
 drivers/scsi/device_handler/scsi_dh_alua.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/scsi/device_handler/scsi_dh_alua.c +0 -0
index 08d80a6..a05d469 100644

drivers/scsi/device_handler/scsi_dh_alua.c static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) · line 647

Quoted 9 lines
drivers/scsi/device_handler/scsi_dh_alua.c +1 -2
@@ -641,8 +641,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
 		h->state = TPGS_STATE_STANDBY;
 		break;
 	case TPGS_STATE_OFFLINE:
-	case TPGS_STATE_UNAVAILABLE:
-		/* Path unusable for unavailable/offline */
+		/* Path unusable */
 		err = SCSI_DH_DEV_OFFLINED;
 		break;
 	default:

Hey, was this patch ok Hannes and James and others?

Quoted 8 lines

I see bb2c94a3a6ad37fe7d34f369295bcdf5387e264f was merged, but this one was not.

I was thinking this might have got missed because it has the same patch description as bb2c94a3a6ad37fe7d34f369295bcdf5387e264f, so it is confusion, but they are different patches. One fixes alua_rtpg and one fixes alua_activate, but both are needed.

Yeah, patch's okay.

Cheers,

Hannes

Signature · 10 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 1/1
#4 lore raw
In reply to Bart Van Assche
Quoted 6 lines · Bart Van Assche

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 enable sending STPG to a target port group that is in the unavailable state.

Quoted 6 lines
Cc Hannes Reinecke <[email protected]>
Cc Mike Christie <[email protected]>
Cc Mike Snitzer <[email protected]>
Cc Babu Moger <[email protected]>

Looks good to me.