From: Mike Christie <michaelc@cs.wisc.edu>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Linux SCSI Mailing List <linux-scsi@vger.kernel.org>,
James Smart <james.smart@emulex.com>
Subject: Re: [PATCH] fc-transport: Close state transition-window during rport deletion.
Date: Tue, 28 Apr 2009 10:01:38 -0500 [thread overview]
Message-ID: <49F71A52.5090802@cs.wisc.edu> (raw)
In-Reply-To: <20090428143746.GE16413@plap4-2.qlogic.org>
Andrew Vasquez wrote:
> On Tue, 28 Apr 2009, Mike Christie wrote:
>
>> Andrew Vasquez wrote:
>>> After an rport's state has transitioned to FC_PORTSTATE_BLOCKED,
>>> but, prior to making the upcall to 'block' the scsi-target
>>> associated with an rport, queued commands can recycle and
>>> ultimately run out of retries causing failures to propagate to
>>> upper-level drivers. Close this transition-window by returning
>>> the non-'retries' modifying DID_IMM_RETRY status for submitted
>>> I/Os.
>>>
>>> Issue seen during continuous LIP-injection.
>>>
>>> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
>>>
>>> ---
>>>
>>> diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
>>> index c9184f7..d189e0e 100644
>>> --- a/include/scsi/scsi_transport_fc.h
>>> +++ b/include/scsi/scsi_transport_fc.h
>>> @@ -687,6 +687,8 @@ fc_remote_port_chkready(struct fc_rport *rport)
>>> case FC_PORTSTATE_BLOCKED:
>>> if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)
>>> result = DID_TRANSPORT_FAILFAST << 16;
>>> + else if (rport->flags & FC_RPORT_DEVLOSS_PENDING)
>>> + result = DID_IMM_RETRY << 16;
>>> else
>>> result = DID_TRANSPORT_DISRUPTED << 16;
>> I think you can just remove this DID_TRANSPORT_DISRUPTED. The deletion,
>> role change or re-addition code will do the right thing with the IO when
>> it finishes the transition for this case.
>
> Just to be clear here, you're proposing this as an alternate?
>
> -- av
>
> diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
> index c9184f7..a53a0fd 100644
> --- a/include/scsi/scsi_transport_fc.h
> +++ b/include/scsi/scsi_transport_fc.h
> @@ -688,7 +688,7 @@ fc_remote_port_chkready(struct fc_rport *rport)
> if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)
> result = DID_TRANSPORT_FAILFAST << 16;
> else
> - result = DID_TRANSPORT_DISRUPTED << 16;
> + result = DID_IMM_RETRY << 16;
Yeah, I think that is what we want. We originally had only
DID_IMM_RETRY. When I added DID_TRANSPORT_DISRUPTED, it initially had
infinite retries like DID_IMM_RETRY so the behavior was not changed.
When I fixed DID_TRANSPORT_DISRUPTED to follow the cmd retries/allowed,
I should have changed this code back to use DID_IMM_RETRY.
next prev parent reply other threads:[~2009-04-28 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 14:01 [PATCH] fc-transport: Close state transition-window during rport deletion Andrew Vasquez
2009-04-28 14:17 ` Mike Christie
2009-04-28 14:37 ` Andrew Vasquez
2009-04-28 15:01 ` Mike Christie [this message]
2009-04-28 16:01 ` Andrew Vasquez
2009-04-29 17:41 ` Mike Christie
2009-04-29 18:12 ` Mike Christie
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=49F71A52.5090802@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=andrew.vasquez@qlogic.com \
--cc=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
/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.