From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] scsi_dh_alua: Do not run STPG for implicit ALUA
Date: Fri, 18 Oct 2019 17:44:44 -0400 [thread overview]
Message-ID: <yq1mudxhgoj.fsf@oracle.com> (raw)
In-Reply-To: <20191018135537.69462-1-hare@suse.de> (Hannes Reinecke's message of "Fri, 18 Oct 2019 15:55:37 +0200")
Hannes,
> If a target only supports implicit ALUA sending a SET TARGET PORT
> GROUPS command is not only pointless, but might actually cause issues.
We already have a conditional in alua_stpg():
if (!(pg->tpgs & TPGS_MODE_EXPLICIT)) {
/* Only implicit ALUA supported, retry */
return SCSI_DH_RETRY;
}
> @@ -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);
Instead of checking for EXPLICIT one place and checking for !IMPLICIT
another, can we consolidate the two and maybe do:
if (pg->flags & ALUA_PG_RUN_STPG &&
scsi_device_tpgs(sdev) == TPGS_MODE_EXPLICIT) {
[...]
and then remove the redundant check in alua_stpg()?
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2019-10-18 21:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=yq1mudxhgoj.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
/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.