Patch "scsi: core: Do not retry I/Os during depopulation" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: core: Do not retry I/Os during depopulation

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-core-do-not-retry-i-os-during-depopulation.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2c343401e457db93757d4d8fa2faede8344026ec
Author: Igor Pylypiv <ipylypiv@xxxxxxxxxx>
Date:   Fri Jan 31 10:44:07 2025 -0800

    scsi: core: Do not retry I/Os during depopulation
    
    [ Upstream commit 9ff7c383b8ac0c482a1da7989f703406d78445c6 ]
    
    Fail I/Os instead of retry to prevent user space processes from being
    blocked on the I/O completion for several minutes.
    
    Retrying I/Os during "depopulation in progress" or "depopulation restore in
    progress" results in a continuous retry loop until the depopulation
    completes or until the I/O retry loop is aborted due to a timeout by the
    scsi_cmd_runtime_exceeced().
    
    Depopulation is slow and can take 24+ hours to complete on 20+ TB HDDs.
    Most I/Os in the depopulation retry loop end up taking several minutes
    before returning the failure to user space.
    
    Cc: stable@xxxxxxxxxxxxxxx # 4.18.x: 2bbeb8d scsi: core: Handle depopulation and restoration in progress
    Cc: stable@xxxxxxxxxxxxxxx # 4.18.x
    Fixes: e37c7d9a0341 ("scsi: core: sanitize++ in progress")
    Signed-off-by: Igor Pylypiv <ipylypiv@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20250131184408.859579-1-ipylypiv@xxxxxxxxxx
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 2f54e1a853099..f026377f1cf1c 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -774,13 +774,18 @@ static void scsi_io_completion_action(struct scsi_cmnd *cmd, int result)
 				case 0x1a: /* start stop unit in progress */
 				case 0x1b: /* sanitize in progress */
 				case 0x1d: /* configuration in progress */
-				case 0x24: /* depopulation in progress */
-				case 0x25: /* depopulation restore in progress */
 					action = ACTION_DELAYED_RETRY;
 					break;
 				case 0x0a: /* ALUA state transition */
 					action = ACTION_DELAYED_REPREP;
 					break;
+				/*
+				 * Depopulation might take many hours,
+				 * thus it is not worthwhile to retry.
+				 */
+				case 0x24: /* depopulation in progress */
+				case 0x25: /* depopulation restore in progress */
+					fallthrough;
 				default:
 					action = ACTION_FAIL;
 					break;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux