All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: linux-scsi@vger.kernel.org
Subject: Re: fc_remote_port_delete and returning SCSI commands from LLD
Date: Wed, 28 Oct 2009 15:27:36 +0100	[thread overview]
Message-ID: <20091028142736.GA7642@schmichrtp.de.ibm.com> (raw)
In-Reply-To: <4AE76BEE.20907@cs.wisc.edu>

On Tue, Oct 27, 2009 at 04:53:50PM -0500, Mike Christie wrote:
> Christof Schmitt wrote:
>> On Wed, Oct 21, 2009 at 01:11:15PM -0500, Mike Christie wrote:
>>> Christof Schmitt wrote:
>>>> If the remote_port status is not BLOCKED, this will trigger the SCSI
>>>> midlayer error handling which cannot do much during the interruption
>>>> to the hardware and will mark the SCSI devices 'offline'. In order to
>>>> prevent this, the rule would be: First call fc_remote_port_delete to
>>>> set the remote port (or in the case of an HBA interruption all remote
>>>> ports) to BLOCKED, and only after this step call scsi_done to pass the
>>>> SCSI commands back to the upper layers.
>>>>
>>> One other note when doing this.
>>>
>>> For problems where you are deleting the rport, it is best to use   
>>> something like DID_TRANSPORT_DISRUPTED to fail the cmd if you are   
>>> failing it right away.
>>
>> "something like DID_TRANSPORT_DISRUPTED" would be any error code that
>> goes through "maybe_retry" in scsi_decide_disposition? I guess moving
>> to DID_TRANSPORT_DISRUPTED is nice for consistency, but DID_ERROR
>> triggers the same code paths as far as i can see.
>
> It could be a little different. See scsi_noretry_cmd. If you used  
> DID_ERROR and something set the driver failfast bit then it would be  
> fast failed.

Ok. Somehow i missed scsi_noretry_cmd while looking at the SCSI code.
Then it makes sense to report DID_TRANSPORT_DISRUPTED from the zfcp. I
will target the zfcp patch for the next merge window.

Christof

      reply	other threads:[~2009-10-28 14:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 14:40 fc_remote_port_delete and returning SCSI commands from LLD Christof Schmitt
2009-10-21 15:24 ` Christof Schmitt
2009-10-21 16:33   ` James Smart
2009-10-23  7:58     ` Christof Schmitt
2009-10-23 14:50       ` James Smart
2009-10-27 16:59         ` Christof Schmitt
2009-10-27 19:44           ` James Smart
2009-10-21 16:24 ` James Smart
2009-10-23  7:47   ` Christof Schmitt
2009-10-23 14:47     ` James Smart
2009-10-27 21:57       ` Mike Christie
2009-10-21 18:11 ` Mike Christie
2009-10-23  7:13   ` Christof Schmitt
2009-10-27 21:53     ` Mike Christie
2009-10-28 14:27       ` Christof Schmitt [this message]

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=20091028142736.GA7642@schmichrtp.de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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.