linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi_dh_alua: Do not run STPG for implicit ALUA
@ 2019-10-18 13:55 Hannes Reinecke
  2019-10-18 21:44 ` Martin K. Petersen
  0 siblings, 1 reply; 3+ messages in thread
From: Hannes Reinecke @ 2019-10-18 13:55 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke,
	Hannes Reinecke

If a target only supports implicit ALUA sending a SET TARGET PORT GROUPS
command is not only pointless, but might actually cause issues.
So don't.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/device_handler/scsi_dh_alua.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 4971104b1817..0053277721d0 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -832,6 +832,10 @@ static void alua_rtpg_work(struct work_struct *work)
 		if (err != SCSI_DH_OK)
 			pg->flags &= ~ALUA_PG_RUN_STPG;
 	}
+	/* Do not run STPG if only implicit ALUA is supported */
+	if (scsi_device_tpgs(sdev) == TPGS_MODE_IMPLICIT)
+		pg->flags &= ~ALUA_PG_RUN_STPG;
+
 	if (pg->flags & ALUA_PG_RUN_STPG) {
 		pg->flags &= ~ALUA_PG_RUN_STPG;
 		spin_unlock_irqrestore(&pg->lock, flags);
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-19 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-18 13:55 [PATCH] scsi_dh_alua: Do not run STPG for implicit ALUA Hannes Reinecke
2019-10-18 21:44 ` Martin K. Petersen
2019-10-19 15:54   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).