On 8/11/22 12:02 PM, Martin Wilck wrote: > On Thu, 2022-08-11 at 11:15 -0500, Mike Christie wrote: >>> >>> I don't think it's _that_ speficic. (retries < allowed) is the >>> default >>> case, at least for the first failure. REQ_FAILFAST_DEV has very few >>> users except for the device handlers, and NEEDS_RETRY is a rather >>> frequently used disposition. >> I'm saying it's really specific because we only hit this code >> path that is causing issues when scsi_check_sense returns >> NEEDS_RETRY. > > What about the other cases in scsi_decide_disposition() that jump to > maybe_retry? Ok one exception to what I wrote. DID_TIMEOUT hits the blk_rq_is_passthrough test of course :) The rest hit that check condition check and are retried like normal IO: scsi_noretry_cmd() ..... switch (host_byte(scmd->result)) { ... if (!scsi_status_is_check_condition(scmd->result)) return false; We get to that blk_rq_is_passthrough for DID_TIME_OUT because it has a goto to bypass the above test. The other host errors we return false above and retry.