[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [GFS2] Don't hold rgrps over transactions



>From 2bdc85e19200bc7e59bdd51364a821e239a0c786 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho redhat com>
Date: Fri, 9 Nov 2007 11:24:50 +0000
Subject: [PATCH] [GFS2] Don't hold rgrps over transactions

We don't need to hold rgrps over transactions because we know that
the rgrp glock must be held, and the only way that the rgrp glock
can be dropped is if the log is flushed, the removing the need to
hold the rgrp at this point in time.

Thus we can remove this from the journaling code to clean/speed
it up.

Signed-off-by: Steven Whitehouse <swhiteho redhat com>

diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 29a8689..8baf3d1 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -470,7 +470,6 @@ static void rg_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
 		gfs2_log_unlock(sdp);
 		return;
 	}
-	gfs2_rgrp_bh_hold(rgd);
 	sdp->sd_log_num_rg++;
 	list_add(&le->le_list, &sdp->sd_log_le_rg);
 	gfs2_log_unlock(sdp);
@@ -487,7 +486,6 @@ static void rg_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
 		sdp->sd_log_num_rg--;
 
 		gfs2_rgrp_repolish_clones(rgd);
-		gfs2_rgrp_bh_put(rgd);
 	}
 	gfs2_assert_warn(sdp, !sdp->sd_log_num_rg);
 }
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 09848aa..e3aa664 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -750,16 +750,6 @@ fail:
 	return error;
 }
 
-void gfs2_rgrp_bh_hold(struct gfs2_rgrpd *rgd)
-{
-	struct gfs2_sbd *sdp = rgd->rd_sbd;
-
-	spin_lock(&sdp->sd_rindex_spin);
-	gfs2_assert_warn(rgd->rd_sbd, rgd->rd_bh_count);
-	rgd->rd_bh_count++;
-	spin_unlock(&sdp->sd_rindex_spin);
-}
-
 /**
  * gfs2_rgrp_bh_put - Release RG bitmaps read in with gfs2_rgrp_bh_get()
  * @rgd: the struct gfs2_rgrpd describing the RG to read in
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index b4c6adf..6d98f2a 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -24,7 +24,6 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp);
 int gfs2_rindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ri_gh);
 
 int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd);
-void gfs2_rgrp_bh_hold(struct gfs2_rgrpd *rgd);
 void gfs2_rgrp_bh_put(struct gfs2_rgrpd *rgd);
 
 void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd);
-- 
1.5.1.2




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]