linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 01/22] scsi: Allow scsi_execute users to control retries
@ 2023-01-23 22:10 Mike Christie
  2023-01-23 22:10 ` [PATCH v7 01/22] scsi: Add helper to prep sense during error handling Mike Christie
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Mike Christie @ 2023-01-23 22:10 UTC (permalink / raw)
  To: bvanassche, mwilck, hch, martin.petersen, linux-scsi, james.bottomley

The following patches, make over Martin's 6.3 scsi-staging branch
because they require the scsi_execute_cmd changes. These patches allow
scsi_execute_cmd users to control exactly which errors are retried,
so we can reduce the sense/sshd handling they have to do and have it
one place.

The patches allow scsi_execute_cmd users to pass in an array of failures
which they want retried/failed 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_cmd users. We just have the special cases
where we want to retry with a difference size command or sleep between
retries.

v7:
- Rebase against scsi_execute_cmd patchset.

v6:
- Fix kunit build when it's built as a module but scsi is not.
- Drop [PATCH 17/35] scsi: ufshcd: Convert to scsi_exec_req because
  that driver no longer uses scsi_execute.
- Convert ufshcd to use the scsi_failures struct because it now just does
  direct retries and does not do it's own deadline timing.
- Add back memset in read_capacity_16.
- Remove memset in get_sectorsize and replace with { } to init buf.

v5:
- Fix spelling (made sure I ran checkpatch strict)
- Drop SCMD_FAILURE_NONE
- Rename SCMD_FAILURE_ANY
- Fix media_not_present handling where it was being retried instead of
failed.
- Fix ILLEGAL_REQUEST handling in read_capacity_16 so it was not retried.
- Fix coding style, spelling and and naming convention in kunit and added
  more tests to handle cases like the media_not_present one where we want
  to force failures instead of retries.
- Drop cxlflash patch because it actually checked it's internal state before
  performing a retry which we currently do not support.

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



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-01-23 22:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 22:10 [PATCH v7 01/22] scsi: Allow scsi_execute users to control retries Mike Christie
2023-01-23 22:10 ` [PATCH v7 01/22] scsi: Add helper to prep sense during error handling Mike Christie
2023-01-23 22:10 ` [PATCH v7 02/22] scsi: Allow passthrough to override what errors to retry Mike Christie
2023-01-23 22:10 ` [PATCH v7 03/22] scsi: Add scsi_failure field to scsi_exec_args Mike Christie
2023-01-23 22:10 ` [PATCH v7 04/22] scsi: Have scsi-ml retry scsi_probe_lun errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 05/22] scsi: retry INQUIRY after timeout Mike Christie
2023-01-23 22:10 ` [PATCH v7 06/22] scsi: Have scsi-ml retry read_capacity_16 errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 07/22] scsi: Use separate buf for START_STOP in sd_spinup_disk Mike Christie
2023-01-23 22:10 ` [PATCH v7 08/22] scsi: Have scsi-ml retry sd_spinup_disk errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 09/22] scsi: hp_sw: Have scsi-ml retry scsi_exec_req errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 10/22] scsi: rdac: Have scsi-ml retry send_mode_select errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 11/22] scsi: spi: Have scsi-ml retry spi_execute errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 12/22] scsi: sd: Have scsi-ml retry sd_sync_cache errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 13/22] scsi: ch: Remove unit_attention Mike Christie
2023-01-23 22:10 ` [PATCH v7 14/22] scsi: ch: Have scsi-ml retry ch_do_scsi errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 15/22] scsi: Have scsi-ml retry scsi_mode_sense UAs Mike Christie
2023-01-23 22:10 ` [PATCH v7 16/22] scsi: Have scsi-ml retry scsi_report_lun_scan errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 17/22] scsi: sd: Have sd_pr_command retry UAs Mike Christie
2023-01-23 22:10 ` [PATCH v7 18/22] scsi: sd: Have scsi-ml retry read_capacity_10 errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 19/22] scsi: ses: Have scsi-ml retry scsi_exec_req errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 20/22] scsi: sr: Have scsi-ml retry get_sectorsize errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 21/22] scsi: ufs: Have scsi-ml retry start stop errors Mike Christie
2023-01-23 22:10 ` [PATCH v7 22/22] scsi: Add kunit tests for scsi_check_passthrough Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).