Whamcloud - gitweb
LU-1311 Disable local irqs when locking tcds while walking them
authorOleg Drokin <green@whamcloud.com>
Thu, 26 Apr 2012 21:43:11 +0000 (17:43 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 7 May 2012 19:37:13 +0000 (15:37 -0400)
commiteba158939e20b37e178ad3e0e78f4647e9faee0d
tree14a3edf51e048e60ef5775d565520576720d0c79
parent4c2f91a997e489c74fde0bb0ae5e90d30831602a
LU-1311 Disable local irqs when locking tcds while walking them

This helps us to avoid a deadlock with other threads that goes like this:
thread doint the walking = (1)
other thread = (2)

(1) get some non-irq type tcd locked while walking the tcds
(2) get some irq/bh lock
(2) try to print a debugging message and block on the tcd lock held by (1)
(1) irq/bh arrives, tries to get irq/bh lock held by (2) == BAM!

Change-Id: If1e1cc57c0f2e287b453e34db0c894c1ca830b9a
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2605
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
libcfs/libcfs/linux/linux-tracefile.c
libcfs/libcfs/tracefile.h
libcfs/libcfs/winnt/winnt-tracefile.c