diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-08-25 14:04:08 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 12:08:04 -0500 |
commit | e7a51997dad4e17395be1209970e18d2e9305b24 (patch) | |
tree | 153db22788bdd7302c6bd58f91a5d5c0da0a4ab6 /.mailmap | |
parent | 1d490ce33ee8b93638d09e471a3bc66ae33b6606 (diff) |
[SCSI] fcoe: flush per-cpu thread work when destroying interface
This fixes one cause of an occational problem when unloading
libfc where the exchange manager pool doesn't have all items freed.
The existing WARN_ON(mp->total_exches <= 0) isn't hit.
However, note that total_exches is decremented when the
exchange is completed, and it can be held with a refcnt
for a while after that.
I'm not sure what the offending exchange is, but I suspect
it is an incoming request, because outgoing state machines
should be all stopped at this point.
Note that although receive is stopped before the exchange
manager is freed, there could still be active threads
handling received frames.
This patch flushes the queues by allocating a new skb
and sending it through, and have the thread handle
this new skb specially. This is similar to the way the work
queues are flushed now by putting work items in them and waiting
until they make it through the queue.
An skb->destructor function is used to inform us of
the completion of the flush, and the fr_dev() is left
NULL to indicate to fcoe_percpu_receive_thread() that
the skb should be just freed. There's already a check
for the lp being NULL which prints a message.
We skip printing the message if the destructor is for flushing.
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions