Skip to contentSkip to conversation

scsi: libsas: Put the disk offline if all recovery actions fail

PATCH Superseded Xingui Yang 1 participant 2 messages Nov 30, 2023 – Dec 1, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: libsas: Put the disk offline if all recovery actions fail

Currently, after all recovery actions in sas_eh_handle_sas_errors() fail for sas disk, we just clear all IO, but the disk is still online. Perhaps we should continue the subsequent recovery process for IO that cannot be processed. If it still fails, the disk will be offline in scsi_eh_ready_devs().

---
 drivers/scsi/libsas/sas_scsi_host.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/libsas/sas_scsi_host.c +2 -2
index 9047cfcd1072..3f9b99fa1769 100644
@@ -637,8 +637,8 @@ static void sas_eh_handle_sas_errors(struct Scsi_Host *shost, struct list_head *
 			       SAS_ADDR(task->dev->sas_addr),
 			       cmd->device->lun);
 
-			sas_eh_finish_cmd(cmd);
-			goto clear_q;
+			list_move_tail(&cmd->eh_entry, work_q);
+			goto out;
 		}
 	}
  out:
Signature · 1 line
2.17.1
author
#1 lore raw

Sorry, please ignore this email, I need to update a new version, Thanks.

Quoted 28 lines · Xingui Yang

Currently, after all recovery actions in sas_eh_handle_sas_errors() fail for sas disk, we just clear all IO, but the disk is still online. Perhaps we should continue the subsequent recovery process for IO that cannot be processed. If it still fails, the disk will be offline in scsi_eh_ready_devs().

---
  drivers/scsi/libsas/sas_scsi_host.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/libsas/sas_scsi_host.c +2 -2
index 9047cfcd1072..3f9b99fa1769 100644
@@ -637,8 +637,8 @@ static void sas_eh_handle_sas_errors(struct Scsi_Host *shost, struct list_head *
  			       SAS_ADDR(task->dev->sas_addr),
  			       cmd->device->lun);
 
-			sas_eh_finish_cmd(cmd);
-			goto clear_q;
+			list_move_tail(&cmd->eh_entry, work_q);
+			goto out;
  		}
  	}
   out: