Re: [PATCH] Don't retry SG_IO (REQ_BLOCK_PC) commands.

Andries Brouwer
2003-11-22T23:00:24Z

On Fri, Nov 21, 2003 at 08:12:29AM -0600, James Bottomley wrote:

> To be more specific:
>
> I think we need to divide the error types up into
>
> 1. retryable
> 2. fatal
>
> and to have at least two, possibly three sources
>
> 1. the transport
> 2. the device
> (3. the driver)
>
> so a medium error (say a read failure) is a fatal device error;
> something like a no connect would be a fatal transport error, etc.

Yes, the driver is a legitimate source of errors.

If the driver knows that a certain command is not supported
and returns an error condition, then retrying is meaningless.
The error is not necessarily fatal in the sense that the device
does not work, it works just fine, but this particular command
will never get any other reply.

It also happens that the driver needs to allocate memory for
some command. If the allocation fails, that may be a retryable
condition, but immediately retrying is counterproductive.

Andries