]> err.no Git - linux-2.6/commit
[GFS2] soft lockup detected in databuf_lo_before_commit
authorBob Peterson <rpeterso@redhat.com>
Wed, 11 Jul 2007 20:55:23 +0000 (15:55 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 14 Aug 2007 09:32:04 +0000 (10:32 +0100)
commitbdcb88562ca90e6cfac13130e147c63aaa4f9e41
tree54411e375cfd212e641ec464855f7da14e60cf4a
parent3650925893469ccb03dbcc6a440c5d363350f591
[GFS2] soft lockup detected in databuf_lo_before_commit

This is part 2 of the patch for bug #245832, part 1 of which is already
in the git tree.

The problem was that sdp->sd_log_num_databuf was not always being
protected by the gfs2_log_lock spinlock, but the sd_log_le_databuf
(which it is supposed to reflect) was protected.  That meant there
was a timing window during which gfs2_log_flush called
databuf_lo_before_commit and the count didn't match what was
really on the linked list in that window.  So when it ran out of
items on the linked list, it decremented total_dbuf from 0 to -1 and
thus never left the "while(total_dbuf)" loop.

The solution is to protect the variable sdp->sd_log_num_databuf so
that the value will always match the contents of the linked list,
and therefore the number will never go negative, and therefore, the
loop will be exited properly.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/lops.c