Re: [PATCH RESEND] scsi: scan: retry INQUIRY after timeout

Christoph Hellwig
2022-08-09T06:52:56Z

On Mon, Aug 08, 2022 at 05:11:27PM -0500, Mike Christie wrote:
> For REPORT_LUNS it looks like we retry almost all errors 3 times. For the
> probe/setup commands, at least for disks, it looks like we also are more
> forgiving and will retry DID_TIME_OUT/DID_TRANSPORT_DISRUPTED 3 times for
> commands like SAI_READ_CAPACITY_16 (I didn't check every sd operation and
> other upper level drivers).
>
> However, for the other probe/setup operations that rely on scsi_attach_vpd
> succeeding like sd_read_block_limits then we will hit issues where the device
> is partially setup. Should scsi_vpd_inquiry be retrying 3 times as well?
>
> An alternative to changing all the callers would be we could make scsi_noretry_cmd
> detect when it's an internal passthrough command and just retry these types of
> errors. For SG IO type of passthough we still want to fail right away.

Yes, I think one single place to do retries for setup path command
is much better than growing ad-hoc logic.

I just made a similar comment to similar nvme patch from SuSE a few days
ago..