From: James Smart <James.Smart-iH1Dq9VlAzfQT0dZR+AlfA@public.gmane.org>
To: Joe Eykholt <jeykholt-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: "devel-s9riP+hp16TNLxjTenLetw@public.gmane.org"
<devel-s9riP+hp16TNLxjTenLetw@public.gmane.org>,
"linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: how to do fc_remote_port_delete correctly
Date: Wed, 24 Jun 2009 13:43:41 -0400 [thread overview]
Message-ID: <4A4265CD.70509@emulex.com> (raw)
In-Reply-To: <4A425DF1.30005-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Joe Eykholt wrote:
> James Smart wrote:
> That sounds doable. One thing I'm wondering about is what if I
> re-discover the same remote port before devloss timeout.
>
> I'll create new context, but then when I do fc_remote_port_add()
> I'll find that the fc_rport already has a dd_data. Now I have
> two contexts for the same rport. I guess I could switch over to
> the old one, but it's a bit awkward.
>
> One aspect is that the newly discovered rport may have the same port_id
> but different port_name and/or node_name. Since libfc shouldn't be
> concerned about what the binding method is, it may or may not be the
> same fc_rport as before. So fc_remote_port_add should not be called
> until all three items are known, it seems to me.
>
> It would be nice if there was a way for scsi_transport_fc to allow
> creating the fc_rport with only port_id known and add functions to
> change port_name and/or node_name later. However, that just passes
> the problem up to the transport. It would be possible but unlikely
> for a new remote port to have the same port_name as an old one, and
> if that's the binding method, it's messy to handle.
>
>
This is all a repeat of the discussion we had back in Sept 08 on "rogue"
rports, which included a patch to add a routine fc_remote_port_alloc(),
that essentially does everything you describe above.
http://www.open-fcoe.org/pipermail/devel/2008-September/000760.html
http://www.open-fcoe.org/pipermail/devel/2008-September/000837.html
What confuses me - I thought you were already using this, and that it
was to be merged into the kernel tree when fcoe was merged. I don't know
that it went anywhere, and if you're not using it, then we are where we
should be I guess.
> BTW, why is it possible to bind by node_name? It seems useless to me.
> If we made node_name just an attribute and not something that could
> be used for binding, it makes the problem slightly easier. At least
> we could then create fc_rports before knowing the node name.
>
I don't know why node name is interesting - this was something left in
for compatibility reasons (I know our driver had this option before we
introduced transport support). I agree, no one in their sane mind
should be doing it, but not everyone is sane (or one mans sanity is
anothers madness).
node_name isn't the hiccup here. We really need 2 elements - port_id,
wwpn - although we usually include wwnn as well as we treat the "name"
as the <wwnn,wwpn> pair. One without the other doesn't help. The
notion of the rogue rport was - you had an rport structure with nothing
in it - so you could use the context for anything and at the time
fc_remote_port_add() was called, you would either get the rport back
(its new) or you would get the existing structure and the driver would
have to resolve its internal state structures then throw away the rogue.
-- james s
next prev parent reply other threads:[~2009-06-24 17:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 0:27 how to do fc_remote_port_delete correctly Joe Eykholt
[not found] ` <4A4172FA.70008-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-06-24 14:40 ` James Smart
[not found] ` <4A423ADE.80306-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2009-06-24 16:29 ` James Smart
2009-06-24 16:30 ` James Smart
[not found] ` <4A4254BC.6090302-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2009-06-24 17:47 ` Joe Eykholt
[not found] ` <4A426698.3-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-06-24 18:31 ` James Smart
[not found] ` <4A427107.6060303-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>
2009-06-24 19:33 ` Joe Eykholt
2009-06-24 17:10 ` Joe Eykholt
[not found] ` <4A425DF1.30005-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-06-24 17:43 ` James Smart [this message]
2009-06-24 17:45 ` [Open-FCoE] " James Smart
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=4A4265CD.70509@emulex.com \
--to=james.smart-ih1dq9vlazfqt0dzr+alfa@public.gmane.org \
--cc=devel-s9riP+hp16TNLxjTenLetw@public.gmane.org \
--cc=jeykholt-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox