Re: [PATCH 08/18] snic: use reserved commands
From: Hannes Reinecke <hare@suse.de>
Date: 2021-05-04 06:16:38
On 5/4/21 5:12 AM, Bart Van Assche wrote:
On 5/3/21 8:03 AM, Hannes Reinecke wrote:quoted
@@ -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@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer