cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] GFS2: Patch to protect sd_log_num_jdata
  2007-08-22 16:15 [Cluster-devel] [PATCH] GFS2: Patch to protect sd_log_num_jdata Bob Peterson
@ 2007-08-22 16:13 ` Steven Whitehouse
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2007-08-22 16:13 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Now in the -nmw git tree. Thanks,

Steve.

On Wed, 2007-08-22 at 11:15 -0500, Bob Peterson wrote:
> Hi,
> 
> 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.
> 
> Regards,
> 
> Bob Peterson
> --
> diff -pur a/fs/gfs2/lops.c b/fs/gfs2/lops.c
> --- a/fs/gfs2/lops.c	2007-08-21 18:01:07.000000000 -0500
> +++ b/fs/gfs2/lops.c	2007-08-21 18:13:33.000000000 -0500
> @@ -492,11 +492,12 @@ static void databuf_lo_add(struct gfs2_s
>  
>  	gfs2_trans_add_gl(bd->bd_gl);
>  	if (gfs2_is_jdata(ip)) {
> -		sdp->sd_log_num_jdata++;
>  		gfs2_pin(sdp, bd->bd_bh);
>  		tr->tr_num_databuf_new++;
>  	}
>  	gfs2_log_lock(sdp);
> +	if (gfs2_is_jdata(ip))
> +		sdp->sd_log_num_jdata++;
>  	sdp->sd_log_num_databuf++;
>  	list_add(&le->le_list, &sdp->sd_log_le_databuf);
>  	gfs2_log_unlock(sdp);
> 
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] GFS2: Patch to protect sd_log_num_jdata
@ 2007-08-22 16:15 Bob Peterson
  2007-08-22 16:13 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2007-08-22 16:15 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

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.

Regards,

Bob Peterson
--
diff -pur a/fs/gfs2/lops.c b/fs/gfs2/lops.c
--- a/fs/gfs2/lops.c	2007-08-21 18:01:07.000000000 -0500
+++ b/fs/gfs2/lops.c	2007-08-21 18:13:33.000000000 -0500
@@ -492,11 +492,12 @@ static void databuf_lo_add(struct gfs2_s
 
 	gfs2_trans_add_gl(bd->bd_gl);
 	if (gfs2_is_jdata(ip)) {
-		sdp->sd_log_num_jdata++;
 		gfs2_pin(sdp, bd->bd_bh);
 		tr->tr_num_databuf_new++;
 	}
 	gfs2_log_lock(sdp);
+	if (gfs2_is_jdata(ip))
+		sdp->sd_log_num_jdata++;
 	sdp->sd_log_num_databuf++;
 	list_add(&le->le_list, &sdp->sd_log_le_databuf);
 	gfs2_log_unlock(sdp);




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-22 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22 16:15 [Cluster-devel] [PATCH] GFS2: Patch to protect sd_log_num_jdata Bob Peterson
2007-08-22 16:13 ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).