On 10/16/23 15:38, Christoph Hellwig wrote:
On Mon, Oct 16, 2023 at 11:24:25AM +0200, Hannes Reinecke wrote:
+ req = scsi_alloc_request(sdev->request_queue, REQ_OP_DRV_IN,
+ BLK_MQ_REQ_NOWAIT);
+ if (!req) {
+ SNIC_HOST_ERR(snic->shost,
+ "Devrst: TMF busy\n");
+ goto dev_rst_end;
So if we fail this allocation, which can easily happen, we just fail
the reset and escalate. If that's fine we probably want a big fat
comment about that here.
Yes, that is precisely the intention.
If scsi_alloc_request() fails it means the we're on a quite busy system,
where _all_ requests are in error (remember, this is SCSI EH where all
commands are completed except for the failed ones).
And in that case a host reset is probably the better option.
But okay, I'll be adding a warning / comment here.
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: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman