From: Mike Christie <michaelc@cs.wisc.edu>
To: James.Smart@Emulex.Com
Cc: devel@open-fcoe.org, linux-scsi@vger.kernel.org
Subject: Re: [Open-FCoE] [PATCH 1/1] libfc: fix queue command rport checks
Date: Wed, 16 Jul 2008 16:22:44 -0500 [thread overview]
Message-ID: <487E66A4.9030601@cs.wisc.edu> (raw)
In-Reply-To: <D1D4C3FF75F9354393DB8314DF43DEF2E7F02E@xbl3.ma.emulex.com>
James.Smart@Emulex.Com wrote:
> Yeah, I realize the scenario. What's confusing is, it's has been a
> while since I've seen any cache failure message get spit out. But your
> logic is pretty solid.
>
> Anyway, your idea of converting fc_remove_host() to call
> scsi_remove_target()
> for all the targets prior to deleting the rports is a good one. And the
> terminate_rport_io call is already in fc_rport_final_delete().
>
> This doesn't make sense to me though:
>> then in the fcoe termniate_rport_io function we could stop the port?
> If "port" means the fcoe port, and if this was the last rport, then I
> guess
> it kinda makes sense. But I would have assumed that the outer thread
> that is
> calling fc_remove_host() and scsi_remove_host() would have actually have
> been the one to stop/terminate the fcoe port after making these calls.
>
The problem I was thinking about was if we had a rport that we were
logged into and needed to cleanup some resources for it before it got
freed. If we do the cleanup after calling
fc_remove_host()/scsi_remove_host(), the LLD would need to get a ref to
it, so that when fc_remove_host() deletes it, the rport and the dd_data
would not get freed.
So I thought it if we could do the cleanup in some callout after the
target is removed but before the rport is freed. I think I meant to do
this in the dev_loss_tmo_callbk(). qla2xxx was allocating its own rport
struct and is freeing it in dev_loss_tmo_callbk(). For fcoe we are just
using the scsi_transport_fc rport it the dd_data, but I was thinking if
we needed to cleanup some other rport resrouces we could do it from the
dev_loss_tmo_callbk().
next prev parent reply other threads:[~2008-07-16 21:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 18:50 [PATCH 1/1] libfc: fix queue command rport checks michaelc-hcNo3dDEHLuVc3sceRu5cw
[not found] ` <1216234249-10812-1-git-send-email-michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2008-07-16 18:56 ` Mike Christie
2008-07-16 19:08 ` James.Smart
[not found] ` <D1D4C3FF75F9354393DB8314DF43DEF2E7F01C-0GoafHKvaWWVoqRKY1PiFtBPR1lH4CV8@public.gmane.org>
2008-07-16 19:36 ` Mike Christie
2008-07-16 19:45 ` [Open-FCoE] " Mike Christie
2008-07-16 19:51 ` Mike Christie
2008-07-16 21:11 ` James.Smart-iH1Dq9VlAzfQT0dZR+AlfA
2008-07-16 21:22 ` Mike Christie [this message]
2008-07-17 13:43 ` James.Smart-iH1Dq9VlAzfQT0dZR+AlfA
2008-07-16 20:07 ` James.Smart-iH1Dq9VlAzfQT0dZR+AlfA
2008-07-16 20:49 ` [Open-FCoE] " Mike Christie
[not found] ` <487E5ED6.9040302-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2008-07-16 20:55 ` 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=487E66A4.9030601@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Smart@Emulex.Com \
--cc=devel@open-fcoe.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox