Re: [PATCH 0/5] scsi: fnic: use blk_mq_tagset_busy_iter() to walk scsi commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Cc: Karan Tilak Kumar <kartilak@xxxxxxxxx>
Cc: David Jeffery <djeffery@xxxxxxxxxx>

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. 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.

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.

Will be reposting the patchset shortly.

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux