[SCSI] fix for fc transport recursion problem.
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>
Thu, 15 Dec 2005 14:56:22 +0000 (09:56 -0500)
committerJames Bottomley <jejb@mulgrave.(none)>
Fri, 16 Dec 2005 03:22:14 +0000 (19:22 -0800)
commit42e33148df38c60b99d984b76b302c64397ebe4c
tree8f7b7f446250d7ae5261c09aaf4a8f5e245794dd
parent7116317dc9148d783846299fc80a7d377baa6dca
[SCSI] fix for fc transport recursion problem.

In the scenario that a link was broken, the devloss timer for each
rport was expire at roughly the same time, causing lots of "delete"
workqueue items being queued. Depth is dependent upon the number of
rports that were on the link.

The rport target remove calls were calling flush_scheduled_work(),
which would interrupt the stream, and start the next workqueue item,
which did the same thing, and so on until recursion depth was large.

This fix stops the recursion in the initial delete path, and pushes it
off to a host-level work item that reaps the dead rports.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_transport_fc.c
include/scsi/scsi_transport_fc.h