]> git.baikalelectronics.ru Git - kernel.git/commit
tcm_fc: Work queue based approach instead of managing own thread and event based...
authorChristoph Hellwig <hch@lst.de>
Fri, 26 Aug 2011 16:25:38 +0000 (09:25 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 16 Sep 2011 09:50:09 +0000 (09:50 +0000)
commit24de0fc91bed770d3f5169d76a0585320f18d33e
tree0be84c4241f9080cfa01a369675e883114ed37cf
parent116ce6669b32cf3f720443d1a3293c1d6f86444d
tcm_fc: Work queue based approach instead of managing own thread and event based mechanism

Problem: Changed from wake_up_interruptible -> wake_up_process and
wait_event_interruptible-> schedule_timeout_interruptible broke the FCoE
target.  Earlier approach of wake_up_interruptible was also looking at
'queue_cnt' which is not necessary, because it increment of 'queue_cnt'
with wake_up_inetrriptible / waker_up_process introduces race condition.

Fix: Instead of fixing the code which used wake_up_process and remove
'queue_cnt', using work_queue based approach is cleaner and acheives
same result. As well, work queue based approach has less programming
overhead and OS manages threads which processes work queues.

This patch is developed by Christoph Hellwig and reviwed+validated by
Kiran Patil.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/tcm_fc/tcm_fc.h
drivers/target/tcm_fc/tfc_cmd.c
drivers/target/tcm_fc/tfc_conf.c