From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Hannes Reinecke <hare@suse.com>
Subject: [PATCH] scsi_dh_alua: Do not run STPG for implicit ALUA
Date: Fri, 18 Oct 2019 15:55:37 +0200 [thread overview]
Message-ID: <20191018135537.69462-1-hare@suse.de> (raw)
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
next reply other threads:[~2019-10-18 13:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 13:55 Hannes Reinecke [this message]
2019-10-18 21:44 ` [PATCH] scsi_dh_alua: Do not run STPG for implicit ALUA Martin K. Petersen
2019-10-19 15:54 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191018135537.69462-1-hare@suse.de \
--to=hare@suse.de \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.