From: Niu Yawei Date: Wed, 9 Nov 2011 03:23:52 +0000 (-0800) Subject: LU-745 kernel: ost-pools test_23 hung X-Git-Tag: 2.1.53~64 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2e85b733f68b474c98ff3ed74d6bb5dc150b0c23;hp=2e85b733f68b474c98ff3ed74d6bb5dc150b0c23;p=fs%2Flustre-release.git 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 Change-Id: I44dce352babc6699cdacc00263bfd3f24538400c Reviewed-on: http://review.whamcloud.com/1675 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin ---