mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: libsas: Put the disk offline if all recovery actions fail
@ 2023-11-30 13:01 Xingui Yang
  2023-12-01  2:59 ` yangxingui
  0 siblings, 1 reply; 2+ messages in thread
From: Xingui Yang @ 2023-11-30 13:01 UTC (permalink / raw)
  To: john.g.garry, yanaijie, damien.lemoal
  Cc: linux-scsi, linux-kernel, wubo40, kangfenglong

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().

Signed-off-by: Xingui Yang <yangxingui@huawei.com>
Signed-off-by: Bo Wu <wubo40@huawei.com>
---
 drivers/scsi/libsas/sas_scsi_host.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 9047cfcd1072..3f9b99fa1769 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -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:
-- 
2.17.1


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

* Re: [PATCH] scsi: libsas: Put the disk offline if all recovery actions fail
  2023-11-30 13:01 [PATCH] scsi: libsas: Put the disk offline if all recovery actions fail Xingui Yang
@ 2023-12-01  2:59 ` yangxingui
  0 siblings, 0 replies; 2+ messages in thread
From: yangxingui @ 2023-12-01  2:59 UTC (permalink / raw)
  To: john.g.garry, yanaijie, damien.lemoal
  Cc: linux-scsi, linux-kernel, wubo40, kangfenglong

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

On 2023/11/30 21:01, Xingui Yang wrote:
> 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().
> 
> Signed-off-by: Xingui Yang <yangxingui@huawei.com>
> Signed-off-by: Bo Wu <wubo40@huawei.com>
> ---
>   drivers/scsi/libsas/sas_scsi_host.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
> index 9047cfcd1072..3f9b99fa1769 100644
> --- a/drivers/scsi/libsas/sas_scsi_host.c
> +++ b/drivers/scsi/libsas/sas_scsi_host.c
> @@ -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:
> 

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

end of thread, other threads:[~2023-12-01  3:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30 13:01 [PATCH] scsi: libsas: Put the disk offline if all recovery actions fail Xingui Yang
2023-12-01  2:59 ` yangxingui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®