mbox series

[RFC,00/22] Allow scsi_execute users to control retries

Message ID 20220922100704.753666-1-michael.christie@oracle.com
Headers show
Series Allow scsi_execute users to control retries | expand

Message

Mike Christie Sept. 22, 2022, 10:06 a.m. UTC
The following patches made over a combo of linus's tree nd Martin's
6.1-queue tree (the are both missing patches) allow scsi_execute* users
to control exactly which errors are retried.

The patches allow scsi_execute users to pass in an array of failures
which they want retried and also specify how many times they want them
retried. If we hit an error that the user did not specify then we drop
down the the default behavior. This allows us to remove all the retry code
from the callers except for a couple cases where the caller:

1. wants to sleep between retries or had strict timings (sd_spinup_disk
or ufs).
2. needed to set some internal state between retries (scsi_test_unit_ready)
3. retried based on the error code and it's internal state (alua rtpg).

These patches have only been lightly tested. I'm more looking for an
ACK on the idea because this is different than what I mentioned on the
list a couple weeks ago.

TODO:
1. There is still the scsi_cmnd->allowed/retries. I think I could just
add a default scsi_failure struct on the scsi_cmnd and make the code
more common.