]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] fcoe: use dedicated workqueue instead of system_wq
authorTejun Heo <tj@kernel.org>
Sat, 29 Jan 2011 00:05:32 +0000 (16:05 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 12 Feb 2011 17:17:50 +0000 (11:17 -0600)
commit9737e1ab88e667da0a2ff694935fead63fc5acc5
tree935d1a9f72f7cf1d6642ae2b427ea73108b3d8e6
parent81246271c80f55d21027b25faaaafac5fd1d8a31
[SCSI] fcoe: use dedicated workqueue instead of system_wq

fcoe uses the system_wq to destroy ports and the work items need to be
flushed before the driver is unloaded.  As the work items free the
containing data structure, they can't be flushed directly.  The
workqueue should be flushed instead.

Also, the destruction works can be chained - ie. destruction of a port
may lead to destruction of another port where the work item for the
former queues the work for the latter.  Currently, the depth of chain
can be at most two and fcoe_exit() makes sure everything is complete
by calling flush_scheduled_work() twice.

With commit 85727511 (workqueue: allow chained queueing during
destruction), destroy_workqueue() can take care of chained works on
workqueue destruction.  Add and use fcoe_wq instead.  Simply
destroying fcoe_wq on driver unload takes care of flushing.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/fcoe/fcoe.c