From: Ming Lei <ming.lei@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Satish Kharat <satishkh@cisco.com>,
Karan Tilak Kumar <kartilak@cisco.com>,
David Jeffery <djeffery@redhat.com>,
Daniel Wagner <dwagner@suse.de>
Subject: Re: [PATCH 0/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands
Date: Wed, 21 Apr 2021 22:05:03 +0800 [thread overview]
Message-ID: <YIAxD+5G8Ra43CB/@T590> (raw)
In-Reply-To: <fd6f98c269e95d9cd0a36cf4b62d290e612ba006.camel@suse.com>
On Wed, Apr 21, 2021 at 02:33:46PM +0200, Martin Wilck wrote:
> On Wed, 2021-04-21 at 18:40 +0800, Ming Lei wrote:
> > On Wed, Apr 21, 2021 at 12:19:00PM +0200, Martin Wilck wrote:
> > > On Wed, 2021-04-21 at 15:55 +0800, Ming Lei wrote:
> > > > Hello Guys,
> > > >
> > > > fnic uses the following way to walk scsi commands in failure
> > > > handling,
> > > > which is obvious wrong, because caller of scsi_host_find_tag has
> > > > to
> > > > guarantee that the tag is active.
> > > >
> > > > for (tag = 0; tag < fnic->fnic_max_tag_id; tag++) {
> > > > ...
> > > > sc = scsi_host_find_tag(fnic->lport->host, tag);
> > > > ...
> > > > }
> > > >
> > > > Fix the issue by using blk_mq_tagset_busy_iter() to walk
> > > > request/scsi_command.
> > >
> > > How does this relate to Hannes' previous patch?
> > > https://marc.info/?l=linux-scsi&m=161400059528859&w=2
> >
> > oops, this patch is actually same or similar with Hannes's.
> >
> > Given these patches are bug fix, can we cherry-pick them for 5.13?
>
> No objections in principle, but the differences between your patch and
> Hannes' are pretty large. I couldn't tell which one is more
> appropriate.
>
> Question: Both your patch set and Hannes' patch replace a couple of
> scsi_host_find_tag() calls in the fnic driver, while leaving some
> others in place. It's not clear to me why we can be sure that no
> corruption occurs in any of the latter. Could you explain?
Caller of scsi_host_find_tag() has to guarantee that the passed tag
is active.
The changed functions do pass invalid tag to scsi_host_find_tag(), so
we need to fix them.
Thanks,
Ming
next prev parent reply other threads:[~2021-04-21 14:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 7:55 [PATCH 0/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands Ming Lei
2021-04-21 7:55 ` [PATCH 1/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in fnic_terminate_rport_io Ming Lei
2021-04-21 7:55 ` [PATCH 2/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in fnic_clean_pending_aborts Ming Lei
2021-04-21 7:55 ` [PATCH 3/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in fnic_cleanup_io Ming Lei
2021-04-21 7:55 ` [PATCH 4/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in fnic_rport_exch_reset Ming Lei
2021-04-21 7:55 ` [PATCH 5/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in fnic_is_abts_pending Ming Lei
2021-04-21 10:19 ` [PATCH 0/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands Martin Wilck
2021-04-21 10:40 ` Ming Lei
2021-04-21 12:33 ` Martin Wilck
2021-04-21 14:05 ` Ming Lei [this message]
2021-04-21 20:14 ` Hannes Reinecke
2021-04-22 0:08 ` Ming Lei
2021-04-22 14:17 ` Ming Lei
2021-04-26 7:30 ` Hannes Reinecke
2021-04-26 8:04 ` Ming Lei
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=YIAxD+5G8Ra43CB/@T590 \
--to=ming.lei@redhat.com \
--cc=djeffery@redhat.com \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=kartilak@cisco.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mwilck@suse.com \
--cc=satishkh@cisco.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox