All of lore.kernel.org
 help / color / mirror / Atom feed
From: Muneendra Kumar M <muneendra.kumar@broadcom.com>
To: Mike Christie <michael.christie@oracle.com>,
	linux-scsi@vger.kernel.org, hare@suse.de
Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com
Subject: RE: [PATCH v3 05/17] scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL
Date: Mon, 19 Oct 2020 16:17:47 +0530	[thread overview]
Message-ID: <c3d65f732be0b73e4d4ebb742bc754cd@mail.gmail.com> (raw)
In-Reply-To: <5ca752c2-94e1-444a-7755-f48b09b38577@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]

Hi Mike,
Thanks for the review.

>> +fc_remote_port_chkready(struct fc_rport *rport, struct scsi_cmnd
>> +*cmd)
> >  {
>   >	int result;
>  >
>   >	switch (rport->port_state) {
>   >	case FC_PORTSTATE_ONLINE:
> >+	case FC_PORTSTATE_MARGINAL:
>   >		if (rport->roles & FC_PORT_ROLE_FCP_TARGET)
>   >			result = 0;
>   >		else if (rport->flags & FC_RPORT_DEVLOSS_PENDING)
>>   			result = DID_IMM_RETRY << 16;
>>   		else
>>   			result = DID_NO_CONNECT << 16;
> >+
> >+		if (cmd)
> >+			fc_rport_chkmarginal_set_noretries(rport, cmd);

>I was just wondering why don't you do drop all the SCMD_NORETRIES_ABORT
>code and then in this function when you check for the marginal state do:

>result = DID_TRANSPORT_MARGINAL;

?
[Muneendra] Correct me if my understanding is correct?
You mean to say ,if the SCMD_NORETRIES_ABORT is set end up failing the IO
with DID_TRANSPORT_MARGINAL instead of retry?
I assume that your below point 3 talks the same.
Let me know if this is correct.

>So you would do:

>1. Userspace calls in scsi_transport_fc and sets the port state to
>marginal.
2. New commands would see the above check and complete the command with
DID_TRANSPORT_MARGINAL.
[Muneendra]Correct me if my understanding is right.
You mean to say if the port_state is set to marginal return all the new
commands with DID_TRANSPORT_MARGINAL  (without checking
SCMD_NORETRIES_ABORT)?

If yes then below are my concerns
In marginal state  what we want is the ios to be attempted at least once .

In marginal state we cannot drop all the commands as one of the concern we
have is if a target is non-mpio based targets then we will be dropping it
without any attempt.
With this we will be even dropping the TUR commands also which unnecessarily
lead to error handling.


3. If a command is retried by the scsi layer we would end up hitting this
function and see the check and end up faling the IO like in #2. It would be
similar to what happens when the dev loss or fast io fail timers fire.


[Muneendra]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4177 bytes --]

  reply	other threads:[~2020-10-19 10:47 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15  3:27 [PATCH v3 00/17] scsi: Support to handle Intermittent errors Muneendra
2020-10-15  3:27 ` [PATCH v3 01/17] scsi: Added a new definition in scsi_cmnd.h Muneendra
2020-10-15  3:27 ` [PATCH v3 02/17] scsi: Added a new error code in scsi.h Muneendra
2020-10-15  3:27 ` [PATCH v3 03/17] scsi: No retries on abort success Muneendra
2020-10-16 18:37   ` Mike Christie
2020-10-19 19:05   ` Mike Christie
2020-10-19 19:26     ` Muneendra Kumar M
2020-10-20 19:53       ` Mike Christie
2020-10-20 20:18         ` Mike Christie
2020-10-21 18:51           ` Muneendra Kumar M
2020-10-15  3:27 ` [PATCH v3 04/17] scsi: Added routine to set/clear SCMD_NORETRIES_ABORT bit for outstanding io on scsi_dev Muneendra
2020-10-15  3:27 ` [PATCH v3 05/17] scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL Muneendra
2020-10-16 19:52   ` Mike Christie
2020-10-19 10:47     ` Muneendra Kumar M [this message]
2020-10-19 16:10       ` Michael Christie
2020-10-19 16:19         ` Michael Christie
2020-10-19 17:16           ` Hannes Reinecke
2020-10-19 17:31             ` Muneendra Kumar M
2020-10-19 18:55               ` Mike Christie
2020-10-19 19:03                 ` Muneendra Kumar M
2020-10-20 18:24                   ` Benjamin Marzinski
2020-10-20  6:03                 ` Hannes Reinecke
2020-10-19 18:03             ` Muneendra Kumar M
2020-10-19 18:44               ` Mike Christie
2020-10-19 18:55                 ` Muneendra Kumar M
2020-10-20 16:48                   ` Mike Christie
2020-10-20 17:19                     ` Muneendra Kumar M
2020-10-20 18:44                       ` Benjamin Marzinski
2020-10-20 18:14                   ` Benjamin Marzinski
2020-10-15  3:27 ` [PATCH v3 06/17] scsi_transport_fc: Added store fucntionality to set the rport port_state using sysfs Muneendra
2020-10-15 14:05   ` kernel test robot
2020-10-15 14:05     ` kernel test robot
2020-10-16 18:34   ` Mike Christie
2020-10-19 10:52     ` Muneendra Kumar M
2020-10-15  3:27 ` [PATCH v3 07/17] scsi:lpfc: Added changes to fc_remote_port_chkready Muneendra
2020-10-15  3:27 ` [PATCH v3 08/17] scsi:qla2xx: " Muneendra
2020-10-15  3:27 ` [PATCH v3 09/17] scsi:qedf: " Muneendra
2020-10-15  3:27 ` [PATCH v3 10/17] scsi:libfc: " Muneendra
2020-10-15  3:27 ` [PATCH v3 11/17] scsi:ibmvfc: " Muneendra
2020-10-15  3:27 ` [PATCH v3 12/17] scsi:fnic: " Muneendra
2020-10-15  3:27 ` [PATCH v3 13/17] scsi:bnx2fc: " Muneendra
2020-10-15  3:27 ` [PATCH v3 14/17] scsi:csio: " Muneendra
2020-10-15  3:27 ` [PATCH v3 15/17] scsi:bfa: " Muneendra
2020-10-15  3:27 ` [PATCH v3 16/17] scsi:zfcp: " Muneendra
2020-10-22 16:50   ` Benjamin Block
2020-10-15  3:27 ` [PATCH v3 17/17] scsi:mpt: " Muneendra

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=c3d65f732be0b73e4d4ebb742bc754cd@mail.gmail.com \
    --to=muneendra.kumar@broadcom.com \
    --cc=emilne@redhat.com \
    --cc=hare@suse.de \
    --cc=jsmart2021@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michael.christie@oracle.com \
    --cc=mkumar@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.