public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: Hannes Reinecke <hare@suse.de>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] lpfc: Return DID_TRANSPORT_DISRUPTED instead of DID_REQUEUE
Date: Wed, 24 Aug 2022 07:17:10 -0700	[thread overview]
Message-ID: <1da6ddaa-8f93-9493-1e55-5fb2fc7a6bca@gmail.com> (raw)
In-Reply-To: <20220824060033.138661-1-hare@suse.de>

On 8/23/2022 11:00 PM, Hannes Reinecke wrote:
> When the driver hits on an internal error condition returning
> DID_REQUEUE will cause I/O to be retried on the same ITL nexus.
> This will inhibit multipathing, resulting in endless retries
> even if the error could have been resolved by using a different
> ITL nexus.
> So return DID_TRANSPORT_DISRUPTED to allow for multipath to engage
> and route I/O to another ITL nexus.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>   drivers/scsi/lpfc/lpfc_scsi.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index 084c0f9fdc3a..938a5e435943 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -4272,7 +4272,7 @@ lpfc_fcp_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
>   		    lpfc_cmd->result == IOERR_ABORT_REQUESTED ||
>   		    lpfc_cmd->result == IOERR_RPI_SUSPENDED ||
>   		    lpfc_cmd->result == IOERR_SLER_CMD_RCV_FAILURE) {
> -			cmd->result = DID_REQUEUE << 16;
> +			cmd->result = DID_TRANSPORT_DISRUPTED << 16;
>   			break;
>   		}
>   		if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED ||
> @@ -4562,7 +4562,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
>   			    lpfc_cmd->result == IOERR_NO_RESOURCES ||
>   			    lpfc_cmd->result == IOERR_ABORT_REQUESTED ||
>   			    lpfc_cmd->result == IOERR_SLER_CMD_RCV_FAILURE) {
> -				cmd->result = DID_REQUEUE << 16;
> +				cmd->result = DID_TRANSPORT_DISRUPTED << 16;
>   				break;
>   			}
>   			if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED ||


We need to be careful about the conditions. But I think you handled it well.

Thanks

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james


  reply	other threads:[~2022-08-24 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  6:00 [PATCH] lpfc: Return DID_TRANSPORT_DISRUPTED instead of DID_REQUEUE Hannes Reinecke
2022-08-24 14:17 ` James Smart [this message]
2022-09-01  5:12 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1da6ddaa-8f93-9493-1e55-5fb2fc7a6bca@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox