Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Stewart, Sean and committed by
James Bottomley
7a3ad392 93f91dfa

+7
+7
drivers/scsi/device_handler/scsi_dh_alua.c
··· 712 712 return result; 713 713 } 714 714 715 + static uint optimize_stpg; 716 + module_param(optimize_stpg, uint, S_IRUGO|S_IWUSR); 717 + 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."); 718 + 715 719 /* 716 720 * alua_activate - activate a path 717 721 * @sdev: device on the path to be activated ··· 736 732 err = alua_rtpg(sdev, h); 737 733 if (err != SCSI_DH_OK) 738 734 goto out; 735 + 736 + if (optimize_stpg) 737 + h->flags |= ALUA_OPTIMIZE_STPG; 739 738 740 739 if (h->tpgs & TPGS_MODE_EXPLICIT) { 741 740 switch (h->state) {