Skip to contentSkip to conversation

scsi: docs: update notes about scsi_times_out

PATCH Applied Khazhismel Kumykov 3 participants 4 messages Feb 19, 2022 – Mar 2, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 scsi: docs: update notes about scsi_times_out

Most importantly: eh_timed_out() is not limited by scmd->allowed, and can reset timer forever.

Fixes c829c394165f ("[SCSI] FC transport : Avoid device offline cases by stalling aborts until device unblocked")
---
 Documentation/scsi/scsi_eh.rst | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
Documentation/scsi/scsi_eh.rst +7 -8
index 7d78c2475615..885395dc1f15 100644
@@ -95,19 +95,18 @@ function
 
     - BLK_EH_RESET_TIMER
 	This indicates that more time is required to finish the
-	command.  Timer is restarted.  This action is counted as a
-	retry and only allowed scmd->allowed + 1(!) times.  Once the
-	limit is reached, action for BLK_EH_DONE is taken instead.
+	command.  Timer is restarted.
 
     - BLK_EH_DONE
         eh_timed_out() callback did not handle the command.
 	Step #2 is taken.
 
- 2. scsi_abort_command() is invoked to schedule an asynchrous abort.
-    Asynchronous abort are not invoked for commands which the
-    SCSI_EH_ABORT_SCHEDULED flag is set (this indicates that the command
-    already had been aborted once, and this is a retry which failed),
-    or when the EH deadline is expired. In these case Step #3 is taken.
+ 2. scsi_abort_command() is invoked to schedule an asynchronous abort which may
+    issue a retry scmd->allowed + 1 times.  Asynchronous aborts are not invoked
+    for commands for which the SCSI_EH_ABORT_SCHEDULED flag is set (this
+    indicates that the command already had been aborted once, and this is a
+    retry which failed), when retries are exceeded, or when the EH deadline is
+    expired. In these cases Step #3 is taken.
 
  3. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the
     command.  See [1-4] for more information.
Signature · 1 line
2.35.1.473.g83b2b277ed-goog
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Khazhismel Kumykov

Most importantly: eh_timed_out() is not limited by scmd->allowed, and can reset timer forever.

Fixes c829c394165f ("[SCSI] FC transport : Avoid device offline cases by stalling aborts until device unblocked")

No blank line between a "Fixes:" tag and a "Signed-off-by:" tag please. Anyway:

#2 lore raw
In reply to Khazhismel Kumykov

Khazhismel,

Quoted 2 lines

Most importantly: eh_timed_out() is not limited by scmd->allowed, and can reset timer forever.

Applied to 5.18/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#3 lore raw
In reply to Khazhismel Kumykov
Quoted 6 lines · Khazhismel Kumykov

Most importantly: eh_timed_out() is not limited by scmd->allowed, and can reset timer forever.

Fixes c829c394165f ("[SCSI] FC transport : Avoid device offline cases by stalling aborts until device unblocked")

Applied to 5.18/scsi-queue, thanks!

[1/1] scsi: docs: update notes about scsi_times_out

      https://git.kernel.org/mkp/scsi/c/5c139ce9e1c2
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering