Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: Roman Bolshakov <r.bolshakov@yadro.com>, linux-scsi@vger.kernel.org
Cc: GR-QLogic-Storage-Upstream@marvell.com,
	target-devel@vger.kernel.org, linux@yadro.com,
	Quinn Tran <qutran@marvell.com>, Arun Easi <aeasi@marvell.com>,
	Nilesh Javali <njavali@marvell.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Daniel Wagner <dwagner@suse.de>,
	Himanshu Madhani <himanshu.madhani@oracle.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] scsi: qla2xxx: Keep initiator ports after RSCN
Date: Tue, 26 May 2020 21:17:54 +0200	[thread overview]
Message-ID: <c8e5cc8030542ee8b39639135534c6fe843a7b33.camel@suse.com> (raw)
In-Reply-To: <20200518232248.GG75422@SPB-NB-133.local>

On Tue, 2020-05-19 at 02:22 +0300, Roman Bolshakov wrote:
> On Mon, May 18, 2020 at 09:31:42PM +0300, Roman Bolshakov wrote:
> > 
> 
> P.S. A little bit cleaner alternative would be to avoid session
> deletion
> only if scan needed is set (that allows session deletion of initiator
> ports after fabric discovery if N_Port ID change happened). Please
> let
> me know if I should submit v2 like this:
> 
> diff --git a/drivers/scsi/qla2xxx/qla_gs.c
> b/drivers/scsi/qla2xxx/qla_gs.c
> index 42c3ad27f1cb..b9955af5cffe 100644
> --- a/drivers/scsi/qla2xxx/qla_gs.c
> +++ b/drivers/scsi/qla2xxx/qla_gs.c
> @@ -3495,8 +3495,10 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t
> *vha, srb_t *sp)
>  			if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) {
>  				qla2x00_clear_loop_id(fcport);
>  				fcport->flags |= FCF_FABRIC_DEVICE;
> -			} else if (fcport->d_id.b24 != rp->id.b24 ||
> -				fcport->scan_needed) {
> +			} else if (fcport->d_id.b24 != rp->id.b24 ||
> +				   (fcport->scan_needed &&
> +				    fcport->port_type != FCT_INITIATOR
> &&
> +				    fcport->port_type !=
> FCT_NVME_INITIATOR)) {
>  				qlt_schedule_sess_for_deletion(fcport);
>  			}
>  			fcport->d_id.b24 = rp->id.b24;


Yes, this looks like an improvement to me. To express it in my own
words (as the logic is subtle): wrt the original code, this only
changes the behavior if the NPort ID is unchanged but "scan_needed" is
set - in this case the session used to be deleted, but with this patch
it isn't any more.

Thanks,
Martin



  reply	other threads:[~2020-05-26 19:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 18:31 [PATCH] scsi: qla2xxx: Keep initiator ports after RSCN Roman Bolshakov
2020-05-18 22:40 ` Himanshu Madhani
2020-05-18 23:22 ` Roman Bolshakov
2020-05-26 19:17   ` Martin Wilck [this message]
2020-05-19  8:46 ` Martin Wilck
2020-05-21 15:17   ` Roman Bolshakov
2020-05-26 19:21     ` Martin Wilck
2020-06-03  1:42 ` Martin K. Petersen
2020-06-05 14:23   ` Roman Bolshakov

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=c8e5cc8030542ee8b39639135534c6fe843a7b33.camel@suse.com \
    --to=mwilck@suse.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=aeasi@marvell.com \
    --cc=bvanassche@acm.org \
    --cc=dwagner@suse.de \
    --cc=himanshu.madhani@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=njavali@marvell.com \
    --cc=qutran@marvell.com \
    --cc=r.bolshakov@yadro.com \
    --cc=stable@vger.kernel.org \
    --cc=target-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox