Re: [PATCH v2 21/35] scsi: retry INQUIRY after timeout

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

 



On Wed, 2022-09-28 at 21:53 -0500, Mike Christie wrote:
> Description from: Martin Wilck <mwilck@xxxxxxxx>:
> 
> The SCSI mid layer doesn't retry commands after DID_TIME_OUT (see
> scsi_noretry_cmd()). Packet loss in the fabric can cause spurious
> timeouts
> during SCSI device probing, causing device probing to fail. This has
> been
> observed in FCoE uplink failover tests, for example.
> 
> This patch fixes the issue by retrying the INQUIRY up to 3 times (in
> practice, we never observed more than a single retry),
> 
> Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
> ---
>  drivers/scsi/scsi_scan.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> index 83f33b215e4c..4c2e8d1baf43 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -674,6 +674,10 @@ static int scsi_probe_lun(struct scsi_device
> *sdev, unsigned char *inq_result,
>                         .allowed = 3,
>                         .result = SAM_STAT_CHECK_CONDITION,
>                 },
> +               {
> +                       .allowed = 3,
> +                       .result = DID_TIME_OUT << 16,
> +               },
>                 {},
>         };
>  

Thinking about it (and re-reading my own commit message), it might be
better to just use .allowed = 1 here.

Thanks,
Martin





[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