Whamcloud - gitweb
LU-745 kernel: ost-pools test_23 hung
authorNiu Yawei <niu@whamcloud.com>
Wed, 9 Nov 2011 03:23:52 +0000 (19:23 -0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 9 Jan 2012 19:33:15 +0000 (14:33 -0500)
commit5455d658c9f8da124a3fdaae292718dfa04f9f91
tree85532be62e64410b95f2c04dde4f942ec42f460c
parenta6c1c3ac7e53b3b733331aa65c19191c7da3f578
LU-745 kernel: ost-pools test_23 hung

It could be caused by a jbd2 bug which result in forever sleep
in the do_get_write_access().

http://www.spinics.net/lists/linux-ext4/msg24689.html

In do_get_write_access() we wait on BH_Unshadow bit for buffer to get
from shadow state. The waking code in journal_commit_transaction() has
a bug because it does not issue a memory barrier after the buffer is moved
from the shadow state and before wake_up_bit() is called. Thus a waitqueue
check can happen before the buffer is actually moved from the shadow state
and waiting process may never be woken. Fix the problem by issuing proper
barrier.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I44dce352babc6699cdacc00263bfd3f24538400c
Reviewed-on: http://review.whamcloud.com/1675
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/kernel_patches/patches/fix-forever-in-do_get_write_access.patch [new file with mode: 0644]
lustre/kernel_patches/series/2.6-rhel5.series
lustre/kernel_patches/series/2.6-rhel6.series