gfs2-utils: master - libgfs2: Remove orig_journals from struct gfs2_sbd

Andrew Price andyp at fedoraproject.org
Fri Oct 10 16:19:36 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=f171e00058c706662b1e84567088ed3d9f1acbc6
Commit:        f171e00058c706662b1e84567088ed3d9f1acbc6
Parent:        9d6c8308858d40e99cbd750ba4882f0239b2c1e4
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Fri Oct 10 16:23:27 2014 +0100
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Fri Oct 10 16:23:27 2014 +0100

libgfs2: Remove orig_journals from struct gfs2_sbd

The last remaining user of this field is easily changed to use its own
orig_journals variable instead.

Signed-off-by: Andrew Price <anprice at redhat.com>
---
 gfs2/convert/gfs2_convert.c |    5 +++--
 gfs2/libgfs2/libgfs2.h      |    2 --
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 16ec150..750c4df 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -114,6 +114,7 @@ uint32_t gfs2_max_height;
 uint32_t gfs2_max_jheight;
 uint64_t jindex_addr = 0, rindex_addr = 0;
 int print_level = MSG_NOTICE;
+unsigned orig_journals = 0;
 
 /* ------------------------------------------------------------------------- */
 /* This function is for libgfs's sake.                                       */
@@ -1505,7 +1506,7 @@ static int read_gfs1_jiindex(struct gfs2_sbd *sdp)
 		log_crit(_("journal inode size invalid\n"));
 		goto fail;
 	}
-	sdp->md.journals = sdp->orig_journals = j;
+	sdp->md.journals = orig_journals = j;
 	return 0;
 
  fail:
@@ -1813,7 +1814,7 @@ static int journ_space_to_rg(struct gfs2_sbd *sdp)
 	mh.mh_format = GFS2_FORMAT_RB;
 	log_notice(_("Converting journal space to rg space.\n"));
 	/* Go through each journal, converting them one by one */
-	for (j = 0; j < sdp->orig_journals; j++) { /* for each journal */
+	for (j = 0; j < orig_journals; j++) { /* for each journal */
 		uint64_t size;
 
 		jndx = &sd_jindex[j];
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index 60c1989..58602c0 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -320,8 +320,6 @@ struct gfs2_sbd {
 	struct osi_root rgtree;
 	struct osi_root rgcalc;
 
-	unsigned int orig_journals;
-
 	struct gfs2_inode *master_dir;
 	struct master_dir md;
 


More information about the cluster-commits mailing list