Robert Love wrote:
> On Wed, 2009-08-12 at 11:28 -0700, Robert Love wrote:
>> On Mon, 2009-08-10 at 10:17 -0700, Joe Eykholt wrote:
>>> Allow a struct fc_rport_priv to have no fc_rport associated with it.
>>> This sets up to remove the need for "rogue" rports.
>>>
>>> Add a few fields to fc_rport_priv that are needed before the fc_rport
>>> is created. These are the ids, maxframe_size, classes, and rport pointer.
>>>
>>> Remove the macro PRIV_TO_RPORT(). Just use rdata->rport where appropriate.
>>>
>>> To take the place of the get_device()/put_device ops that were used to
>>> hold both the rport and rdata, add a reference count to rdata structures
>>> using kref. When kref_get decrements the refcount to zero, a new template
>>> function releasing the rdata should be called. This will take care of
>>> freeing the rdata and releasing the hold on the rport (for now). After
>>> subsequent patches make the rport truly optional, this release function
>>> will simply free the rdata.
>>>
>>> Remove the simple inline function fc_rport_set_name(), which becomes
>>> semanticly ambiguous otherwise. The caller will set the port_name and
>>> node_name in the rdata->Ids, which will later be copied to the rport
>>> when it its created.
>>>
>>> Signed-off-by: Joe Eykholt <[email protected]>
>> Hi Joe, I put Chris' latest NPIV prep work patches on and then started
>> applying and testing your patches. I get a NULL pointer exception when
>> the link comes up. At this point I don't know what it is.
>>
> The problem is that when there is no rport associated with the initial
> rdata. When the rdata becomes ready the rdata gets added to the
> rport_event_queue. In fc_rport_work we allocate a new rport and copy any
> relevant information from the rogue rport to the real rport.
>
> This patch's intent is to make the rport optional for a rdata. However,
> after this patch the rport is still required for the rogue-to-real
> transition. The NULL pointer exception occurs here-
>
> rport = rdata->rport;
>
> ...
>
> new_rport = fc_remote_port_add(lport->host, 0, &ids);
> if (new_rport) {
> /*
>
> * Switch from the rogue rport to the
> rport
> * returned by the FC
> class.
> */
> new_rport->maxframe_size = rport->maxframe_size;
>
>
Oh that's a dumb mistake. I should've used rdata instead of rport on that last
line. I'll send you and updated version of that individual patch after testing.
I obviously didn't test the individual patches well enough. As a set, I ran
long overnight tests, but not as individuals.
Thanks very much for debugging this.
Joe
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel