]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] scsi_dh_alua: Add module parameter to allow failover to non preferred path...
authorStewart, Sean <Sean.Stewart@netapp.com>
Thu, 4 Apr 2013 14:54:47 +0000 (14:54 +0000)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 11 Apr 2013 23:00:31 +0000 (16:00 -0700)
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>
drivers/scsi/device_handler/scsi_dh_alua.c

index 6648ffbb121ae88d3cee810f629fecff6d615a34..68adb8955d2d7643e59f810d8d236007103d3bf4 100644 (file)
@@ -712,6 +712,10 @@ static int alua_set_params(struct scsi_device *sdev, const char *params)
        return result;
 }
 
+static uint optimize_stpg;
+module_param(optimize_stpg, uint, S_IRUGO|S_IWUSR);
+MODULE_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.");
+
 /*
  * alua_activate - activate a path
  * @sdev: device on the path to be activated
@@ -733,6 +737,9 @@ static int alua_activate(struct scsi_device *sdev,
        if (err != SCSI_DH_OK)
                goto out;
 
+       if (optimize_stpg)
+               h->flags |= ALUA_OPTIMIZE_STPG;
+
        if (h->tpgs & TPGS_MODE_EXPLICIT) {
                switch (h->state) {
                case TPGS_STATE_NONOPTIMIZED: