Skip to content

Commit

Permalink
[SCSI] ALUA: send STPG if explicit and implicit is supported
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Mike Christie authored and James Bottomley committed Aug 22, 2009
1 parent a4a8b06 commit 3c0d1d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/device_handler/scsi_dh_alua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3c0d1d9

Please sign in to comment.