gfs2-utils: master - gfs2_convert exits with success without doing anything

Abhijith Das adas at fedoraproject.org
Mon Mar 21 22:26:42 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=8f79aadbc06e9edebad08157025fc28c8668ddf8
Commit:        8f79aadbc06e9edebad08157025fc28c8668ddf8
Parent:        ae17f725f37fccaf59087994b54ffdcdb782fa81
Author:        Abhijith Das <adas at redhat.com>
AuthorDate:    Mon Mar 21 17:23:20 2011 -0500
Committer:     Abhijith Das <adas at redhat.com>
CommitterDate: Mon Mar 21 17:23:20 2011 -0500

gfs2_convert exits with success without doing anything

This is a correction to the previous patch that worked only for
the default 4K blocksizes because the internal blocksize value
was not yet updated with the actual value from the ondisk gfs1
superblock.

Resolves: rhbz#688734
Signed-off-by: Abhi Das <adas at redhat.com>
---
 gfs2/convert/gfs2_convert.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index 98876ae..64dfe32 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -1502,7 +1502,6 @@ static int init(struct gfs2_sbd *sbp)
 	sbp->dinodes_alloced = 0; /* dinodes allocated - total them up later */
 	sbp->sd_sb.sb_bsize = GFS2_DEFAULT_BSIZE;
 	sbp->bsize = sbp->sd_sb.sb_bsize;
-	sbp->fssize = lseek(sbp->device_fd, 0, SEEK_END) / sbp->sd_sb.sb_bsize;
 	osi_list_init(&sbp->rglist);
 	if (compute_constants(sbp)) {
 		log_crit("Error: Bad constants (1)\n");
@@ -1518,6 +1517,7 @@ static int init(struct gfs2_sbd *sbp)
 	rindex_addr = be64_to_cpu(raw_gfs1_ondisk_sb.sb_rindex_di.no_addr);
 
 	sbp->bsize = sbp->sd_sb.sb_bsize;
+	sbp->fssize = lseek(sbp->device_fd, 0, SEEK_END) / sbp->sd_sb.sb_bsize;
 	sbp->sd_inptrs = (sbp->bsize - sizeof(struct gfs_indirect)) /
 		sizeof(uint64_t);
 	sbp->sd_diptrs = (sbp->bsize - sizeof(struct gfs_dinode)) /


More information about the cluster-commits mailing list