mbox series

[v4,00/36] Allow scsi_execute users to control retries

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

Message

Mike Christie Oct. 16, 2022, 7:59 p.m. UTC
The following patches, made over Linus's tree because Martin's tree is
missing some patches, allow scsi_execute* users to control exactly which
errors are retried, so we can reduce the sense/sshd handling they have to
do.

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 to the default behavior. This allows us to remove almost all the
retry logic from scsi_execute* users.

v4:
- Redefine cmd definitions if the cmd is touched.
- Fix up coding style issues.
- Use sam_status enum.
- Move failures initialization to scsi_initialize_rq
(also fixes KASAN error).
- Add kunit test.
- Add function comments.

v3:
- Use a for loop in scsi_check_passthrough
- Fix result handling/testing.
- Fix scsi_status_is_good handling.
- make __scsi_exec_req take a const arg
- Fix formatting in patch 24

v2:
- Rename scsi_prep_sense
- Change scsi_check_passthrough's loop and added some fixes
- Modified scsi_execute* so it uses a struct to pass in args