aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStewart, Sean <Sean.Stewart@netapp.com>2013-04-04 10:54:47 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-04-11 19:00:31 -0400
commit7a3ad3920de780e3da1dacabe3c0abcd5b260655 (patch)
tree48d7fc39bb99ca4154f429dbdb0dfcbc73e5c0dc /drivers
parent93f91dfa732eead8fbc938256b6883a93b847021 (diff)
[SCSI] scsi_dh_alua: Add module parameter to allow failover to non preferred path without STPG
Resending with requested rewording of the parameter description. Currently ALUA device handler sends STPG command during failover and failback. Failover can be optimized by implicit failover (by not to sending STPG command), when 1 is passed as hwhandler parameter in multipath.conf. ex "2 alua 1". We may need to pass the parameter through module param for alua device handler to optimize failover if incase retain_attached_hwhandler set in multipath.conf and hwhandler is set with non-tpgs device handler ex: '1 rdac'. [jejb: fix up whitespace and other issues] Signed-off-by: Vijay Chauhan <vijay.chauhan@netapp.com> Signed-off-by: Sean Stewart <Sean.Stewart@netapp.com> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 6648ffbb121a..68adb8955d2d 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -712,6 +712,10 @@ static int alua_set_params(struct scsi_device *sdev, const char *params)
712 return result; 712 return result;
713} 713}
714 714
715static uint optimize_stpg;
716module_param(optimize_stpg, uint, S_IRUGO|S_IWUSR);
717MODULE_PARM_DESC(optimize_stpg, "Allow use of a non-optimized path, rather than sending a STPG, when implicit TPGS is supported (0=No,1=Yes). Default is 0.");
718
715/* 719/*
716 * alua_activate - activate a path 720 * alua_activate - activate a path
717 * @sdev: device on the path to be activated 721 * @sdev: device on the path to be activated
@@ -733,6 +737,9 @@ static int alua_activate(struct scsi_device *sdev,
733 if (err != SCSI_DH_OK) 737 if (err != SCSI_DH_OK)
734 goto out; 738 goto out;
735 739
740 if (optimize_stpg)
741 h->flags |= ALUA_OPTIMIZE_STPG;
742
736 if (h->tpgs & TPGS_MODE_EXPLICIT) { 743 if (h->tpgs & TPGS_MODE_EXPLICIT) {
737 switch (h->state) { 744 switch (h->state) {
738 case TPGS_STATE_NONOPTIMIZED: 745 case TPGS_STATE_NONOPTIMIZED: