When a path is already optimized multipath failover will fail with the message Could not failover device X:Y: Handler scsi_dh_alua Error 15 Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- drivers/scsi/device_handler/scsi_dh_alua.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index a1c69bb..8ea35a9 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -851,6 +851,8 @@ static unsigned alua_stpg(struct scsi_device *sdev, struct alua_port_group *pg) return SCSI_DH_RETRY; } switch (pg->state) { + case TPGS_STATE_OPTIMIZED: + return SCSI_DH_OK; case TPGS_STATE_NONOPTIMIZED: if ((pg->flags & ALUA_OPTIMIZE_STPG) && (!pg->pref) && @@ -865,10 +867,11 @@ static unsigned alua_stpg(struct scsi_device *sdev, struct alua_port_group *pg) break; case TPGS_STATE_TRANSITIONING: return SCSI_DH_RETRY; - break; default: + sdev_printk(KERN_INFO, sdev, + "%s: stpg failed, unhandled TPGS state %d", + ALUA_DH_NAME, pg->state); return SCSI_DH_NOSYS; - break; } /* Set state to transitioning */ pg->state = TPGS_STATE_TRANSITIONING; -- 1.7.12.4 -- 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