public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <James.Smart@emulex.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Steffen Maier <maier@linux.vnet.ibm.com>,
	linux-scsi@vger.kernel.org, Chad Dupuis <chad.dupuis@qlogic.com>,
	Andrew Vasquez <andrew.vasquez@qlogic.com>,
	James Bottomley <jbottomley@parallels.com>,
	Mike Christie <michaelc@cs.wisc.edu>
Subject: Re: [PATCH] scsi_transport_fc: Make 'port_state' writeable
Date: Mon, 1 Apr 2013 16:51:13 -0400	[thread overview]
Message-ID: <5159F341.2070005@emulex.com> (raw)
In-Reply-To: <51430C4A.7090308@suse.de>

Hannes,

I'm finally going through this thread.  I'm a bit uncomfortable about 
making the rport state writeable.  The rport state is tightly tied to 
the driver's discovery engine, and I'm concerned about some of the 
callbacks firing, such as the rport_delete(), and the driver taking an 
action that isn't legit as the driver wasn't the one that called the 
fc_remote_port_delete() call.

I expect, at least in the lpfc driver, we would require a change to work 
with this. Although, we had to add an ugly internal reference counter 
mechanism so we didn't actually early-free structures, that may have 
saved your changing of this.

-- james  s


On 3/15/2013 7:55 AM, Hannes Reinecke wrote:
> On 03/14/2013 07:09 PM, Steffen Maier wrote:
>> Just for my understanding:
>> So this is a bit like writing 0 into the failed attribute of a
>> zfcp_port in sysfs (zfcp_sysfs_port_failed_store()) which forces a
>> port reopen recovery including a sequence of fc_remote_port_delete
>> and fc_remote_port_add?
> Sorta.
> This patch simulates the result of an RSCN where this remote port is 
> missing. So the fast_io_fail / dev_loss_tmo mechanism is triggered 
> (until further notice).
> It'll be reset with the next RSCN or by manually resetting the port 
> state.
>
>> If so, it sounds good to have this functionality for any FC LLD in
>> common code.
>
> That's why I posted this code :-)
> Rationale for this patch is a weird test case with brocade switches;
> there you can actually disable a _target_ port. So the port isn't
> reachable anymore but no RSCN is send.
> And the LLDD is forced into error recovery which'll take _ages_ as 
> each and every command send during error recovery will time out.
>
>> (And I can think about deprecating parts of zfcp code, next we could
>> consider the same for zfcp's forced LUN and adapter recovery or
>> maybe this already exists as sdev's writable state attribute and the
>> adapter recovery can be performed manually by walking all fc_rports
>> writing their port_state.)
>>
> I don't think the sdev 'state' attribute is useable here; it doesn't 
> trigger a rediscovery. You'd want to use 'rescan' here.
> But yeah, that would be one of the goals.
>
> Still waiting for some response to the patch, though.
> Testing has been successful on our side, plus I've posted
> a patchset for multipath-tools utilizing this patch.
>
> So it would be good if it could be included.
>
> James?
>
> Cheers,
>
> Hannes


      parent reply	other threads:[~2013-04-01 20:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 15:02 [PATCH] scsi_transport_fc: Make 'port_state' writeable Hannes Reinecke
2013-03-14 18:09 ` Steffen Maier
2013-03-15 11:55   ` Hannes Reinecke
2013-03-15 12:01     ` Bryn M. Reeves
2013-03-15 12:24     ` Bart Van Assche
2013-03-15 12:37       ` Bryn M. Reeves
2013-03-15 12:46         ` Bart Van Assche
2013-03-15 13:28           ` Bryn M. Reeves
2013-03-15 13:41             ` Bart Van Assche
2013-03-15 18:51               ` Mike Christie
2013-03-15 19:13                 ` Bart Van Assche
2013-03-15 21:12                   ` Mike Christie
2013-03-18  7:09                   ` Hannes Reinecke
2013-04-01 21:06                     ` James Smart
2013-04-04  6:26                       ` Hannes Reinecke
2013-04-05 15:14                         ` James Smart
2013-04-12 14:24                           ` Chad Dupuis
2013-03-18 21:54             ` Jeremy Linton
2013-04-01 20:51     ` James Smart [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=5159F341.2070005@emulex.com \
    --to=james.smart@emulex.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=chad.dupuis@qlogic.com \
    --cc=hare@suse.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maier@linux.vnet.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox