From: Ming Lei <ming.lei@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, Satish Kharat <satishkh@cisco.com>,
Karan Tilak Kumar <kartilak@cisco.com>,
David Jeffery <djeffery@redhat.com>
Subject: Re: [PATCH 0/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands
Date: Mon, 26 Apr 2021 16:04:00 +0800 [thread overview]
Message-ID: <YIZz8NvjNShKGTDS@T590> (raw)
In-Reply-To: <0e4449f0-db4f-6127-a548-c2c841dca49e@suse.de>
On Mon, Apr 26, 2021 at 09:30:45AM +0200, Hannes Reinecke wrote:
> On 4/22/21 4:17 PM, Ming Lei wrote:
> > On Thu, Apr 22, 2021 at 08:08:41AM +0800, Ming Lei wrote:
> >> On Wed, Apr 21, 2021 at 10:14:56PM +0200, Hannes Reinecke wrote:
> >>> On 4/21/21 9:55 AM, 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.
> >>>>
> >>>> thanks,
> >>>> Ming
> >>>>
> >>>>
> >>>> Ming Lei (5):
> >>>> scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in
> >>>> fnic_terminate_rport_io
> >>>> scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in
> >>>> fnic_clean_pending_aborts
> >>>> scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in
> >>>> fnic_cleanup_io
> >>>> scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in
> >>>> fnic_rport_exch_reset
> >>>> scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands in
> >>>> fnic_is_abts_pending
> >>>>
> >>>> drivers/scsi/fnic/fnic_scsi.c | 933 ++++++++++++++++++----------------
> >>>> 1 file changed, 493 insertions(+), 440 deletions(-)
> >>>>
> >>>> Cc: Satish Kharat <satishkh@cisco.com>
> >>>> Cc: Karan Tilak Kumar <kartilak@cisco.com>
> >>>> Cc: David Jeffery <djeffery@redhat.com>
> >>>>
> >>> Well, this is actually not that easy for fnic.
> >>> Problem is the reset hack hch put in some time ago (cf
> >>> fnic_host_start_tag()), which will cause any TMF to use a tag which is _not_
> >>> visible to the busy iter.
> >>
> >> 'git grep -n fnic_host_start_tag ./' shows nothing.
> >>
> >>> That will cause the iter to miss any TMF, with unpredictable results if a
> >>> TMF is running at the same time than, say, a link bounce.
> >>
> >> Wrt. linus tree or next tree, I don't see any issue wrt. your concern.
> >>
> >>>
> >>> I have folded this as part of my patchset for reserved commands in SCSI;
> >>> that way fnic can use 'normal' tags for TMFs, which are then visible to the
> >>> busy iter and life's good.
> >>
> >> No, this fix is one bug fix, which can't depend on your reserved
> >> command in SCSI, and they need to be backported to stable tree too.
> >
> > Hi Hannes,
> >
> > We have customers report on this issue, could you please let us know
> > if you will post out one bug-fix only version?
> >
> And so have we, and indeed we have the same bug reports.
> So I'll be splitting off those patches and send it as a stand-alone
> patchset.
>
That is great!
Glad to give an review after it is posted out.
Thanks,
Ming
prev parent reply other threads:[~2021-04-26 8:04 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
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 [this message]
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=YIZz8NvjNShKGTDS@T590 \
--to=ming.lei@redhat.com \
--cc=djeffery@redhat.com \
--cc=hare@suse.de \
--cc=kartilak@cisco.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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