Hannes Reinecke wrote:
> 
> libiscsi is using DID_IMM_RETRY to signal transient error
> states like IN_RECOVERY or LOGGING_OUT. However, in doing
> so the command will always be retried with no check for
> any failfast setting. This doesn't allow multipath to
> run efficiently if any of these transient error states
> is taking longer than expected and it would be more
> efficient to route the IO to another path.
> 
> Signed-off-by: Hannes Reinecke <h...@suse.de>
> ---
>  drivers/scsi/libiscsi.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 52d876f..21ed45f 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -1302,7 +1302,7 @@ check_mgmt:
>                                        struct iscsi_task, running);
>               list_del_init(&conn->task->running);
>               if (conn->session->state == ISCSI_STATE_LOGGING_OUT) {
> -                     fail_scsi_task(conn->task, DID_IMM_RETRY);
> +                     fail_scsi_task(conn->task, DID_SOFT_ERROR);
>                       continue;
>               }
>               rc = iscsi_prep_scsi_cmd_pdu(conn->task);
> @@ -1446,11 +1446,11 @@ int iscsi_queuecommand(struct scsi_cmnd *sc, void 
> (*done)(struct scsi_cmnd *))
>               case ISCSI_STATE_FAILED:
>               case ISCSI_STATE_IN_RECOVERY:
>                       reason = FAILURE_SESSION_IN_RECOVERY;
> -                     sc->result = DID_IMM_RETRY << 16;
> +                     sc->result = DID_SOFT_ERROR << 16;
>                       break;
>               case ISCSI_STATE_LOGGING_OUT:
>                       reason = FAILURE_SESSION_LOGGING_OUT;
> -                     sc->result = DID_IMM_RETRY << 16;
> +                     sc->result = DID_SOFT_ERROR << 16;
>                       break;
>               case ISCSI_STATE_RECOVERY_FAILED:
>                       reason = FAILURE_SESSION_RECOVERY_TIMEOUT;

Oh yeah one other thing is that DID_SOFT_ERROR is only fast failed when 
the FAILFAST_DRIVER flag is set, and dm-mpath only sets the 
FAILFAST_TRANSPORT flag.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to