Re: [PATCH 08/18] snic: use reserved commands

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

 



On 5/4/21 5:12 AM, Bart Van Assche wrote:
On 5/3/21 8:03 AM, Hannes Reinecke wrote:
@@ -2170,42 +2144,42 @@ snic_device_reset(struct scsi_cmnd *sc)
  		goto dev_rst_end;
  	}
- /* There is no tag when lun reset is issue through ioctl. */
-	if (unlikely(tag <= SNIC_NO_TAG)) {
-		SNIC_HOST_INFO(snic->shost,
-			       "Devrst: LUN Reset Recvd thru IOCTL.\n");
+	reset_sc = scsi_get_internal_cmd(sc->device, REQ_OP_SCSI_IN,
+					 BLK_MQ_REQ_NOWAIT);
+	if (!reset_sc)
+		goto dev_rst_end;

The SCSI error handler may call .eh_device_reset_handler and other error
handling callbacks if no tags are available. If no tags are available,
scsi_get_internal_cmd() will fail. If scsi_get_internal_cmd() fails,
snic_device_reset() will fail. Does that count as a regression?

The snic driver _requires_ a free tag to send a reset.
If no free tags are available the driver cannot send a reset, even in the old code.
So no, this is not a regression.

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