linux/drivers/scsi/fcoe
Robert Love ccefd23ed2 [SCSI] fcoe: Do not switch context in vport_delete callback
Currently all port deletion is routed though the FCoE
workqueue (fcoe_wq). When fc_remove_host is called on
an N_Port (for example, from fcoe_destroy) the vports
are queued into a FC Transport workqueue. fc_remove_host
flushes that queue and each vport is passed to fcoe's
fcoe_vport_destroy, which simply queues the associated
fcoe_ports for later deletion. This queue cannot be
flushed within the N_Ports destroy path because of
circular locking issues. The result is that the NPIV
ports are destroyed after the N_Port, which is reverse
of how they are created.

This quirk causes fcoe to keep references on the
fcoe_interface shared by each of these ports (N_Port
and NPIV). Changing the ordering such that NPIV ports
are destroyed before the N_Port will allow us to remove
reference counting on the fcoe_interface instances.

This patch simply allows fcoe_vport_destory to destroy
NPIV ports without deferring them to a workqueue context.
This ensures that when fc_remove_host is called the
NPIV ports will be destroyed first before the N_Port and
allows reference counting on the fcoe's fcoe_interface
to be remove in a later patch.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19 09:25:17 -06:00
..
fcoe_ctlr.c [SCSI] fcoe: fix fcoe in a DCB environment by adding DCB notifiers to set skb priority 2011-12-15 11:02:07 +04:00
fcoe_transport.c [SCSI] libfcoe: Don't KERN_ERR on netdev notification 2012-02-19 09:19:49 -06:00
fcoe.c [SCSI] fcoe: Do not switch context in vport_delete callback 2012-02-19 09:25:17 -06:00
fcoe.h [SCSI] fcoe: Move fcoe_debug_logging from fcoe.h to fcoe.c 2012-01-16 12:46:31 +04:00
libfcoe.h [SCSI] libfcoe: add implementation to support fcoe transport 2011-02-12 11:06:06 -06:00
Makefile [SCSI] libfcoe: include fcoe_transport.c into kernel libfcoe module 2011-02-12 11:06:52 -06:00