aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2007-08-22 12:15:29 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2007-10-10 03:55:43 -0400
commitec217e0ece60f2240772e6f08e0529775846c627 (patch)
tree2b06b31dbb9165cf086580fe589249e8a54313c2 /fs
parenta947e0335699a1d387c3826e5b8eff9e0afe505e (diff)
[GFS2] Patch to protect sd_log_num_jdata
This is a patch to GFS2 to protect sd_log_num_jdata with the gfs2_log_lock. Without this patch, there is a timing window where you can get hit the following assert from function gfs2_log_flush(): gfs2_assert_withdraw(sdp, sdp->sd_log_num_buf + sdp->sd_log_num_jdata == sdp->sd_log_commited_buf + sdp->sd_log_commited_databuf); I've tested it on my roth cluster and it fixes the problem. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/lops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index a0371f835cfb..7ef335623373 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -492,11 +492,12 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
492 492
493 gfs2_trans_add_gl(bd->bd_gl); 493 gfs2_trans_add_gl(bd->bd_gl);
494 if (gfs2_is_jdata(ip)) { 494 if (gfs2_is_jdata(ip)) {
495 sdp->sd_log_num_jdata++;
496 gfs2_pin(sdp, bd->bd_bh); 495 gfs2_pin(sdp, bd->bd_bh);
497 tr->tr_num_databuf_new++; 496 tr->tr_num_databuf_new++;
498 } 497 }
499 gfs2_log_lock(sdp); 498 gfs2_log_lock(sdp);
499 if (gfs2_is_jdata(ip))
500 sdp->sd_log_num_jdata++;
500 sdp->sd_log_num_databuf++; 501 sdp->sd_log_num_databuf++;
501 list_add(&le->le_list, &sdp->sd_log_le_databuf); 502 list_add(&le->le_list, &sdp->sd_log_le_databuf);
502 gfs2_log_unlock(sdp); 503 gfs2_log_unlock(sdp);