Skip to contentSkip to conversation

ALUA: send STPG if explicit and implicit is supported

PATCH New [email protected] 1 participant 1 message Jul 29, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALUA: send STPG if explicit and implicit is supported

From: Mike Christie <[email protected]>

alua_activate only sends a STPG if only explicit is suppored. As a result, for EMC targets that support both we end up doing a implicit failover when X commands are finally sent to the other SP.

This patch does a AND on the h->tpgs, so we do a explicit failover right away.

---
 drivers/scsi/device_handler/scsi_dh_alua.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/device_handler/scsi_dh_alua.c +1 -1
index dba154c..b5cdefa 100644
@@ -663,7 +663,7 @@ static int alua_activate(struct scsi_device *sdev)
 			goto out;
 	}
 
-	if (h->tpgs == TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED)
+	if (h->tpgs & TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED)
 		err = alua_stpg(sdev, TPGS_STATE_OPTIMIZED, h);
 
 out:
Signature · 1 line
1.6.2.2