gfs2-utils: master - Non-default block size confuses gfs2_grow

Bob Peterson rpeterso@fedoraproject.org
Wed Jan 21 16:33:00 GMT 2009


Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=1dc0d34ab33f6de64da89a815bdb0e574e1e4de9
Commit:        1dc0d34ab33f6de64da89a815bdb0e574e1e4de9
Parent:        f99036f22846aac32c5d210c292b1040e5f889e6
Author:        Bob Peterson <rpeterso@redhat.com>
AuthorDate:    Wed Jan 21 10:30:55 2009 -0600
Committer:     Bob Peterson <rpeterso@redhat.com>
CommitterDate: Wed Jan 21 10:30:55 2009 -0600

Non-default block size confuses gfs2_grow

bz 469773 (originally)

When gfs2_grow calculates the number of new resource groups
needed for an extended file system, it was doing so using values
calculated before the superblock was read in.  Therefore it used
the default block size (4K) regardless of the actual block size.
This patch moves the call to fix_device_geometry after the
superblock has been read in so the calculations are done using
the correct block size.
---
 gfs2/mkfs/main_grow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 7c57a38..e929ebd 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -270,7 +270,6 @@ main_grow(int argc, char *argv[])
 			die("can't open device %s: %s\n",
 			    sdp->device_name, strerror(errno));
 		device_geometry(sdp);
-		fix_device_geometry(sdp);
 		log_info("Initializing lists...\n");
 		osi_list_init(&sdp->rglist);
 		init_buf_list(sdp, &sdp->buf_list, 128 << 20);
@@ -282,6 +281,7 @@ main_grow(int argc, char *argv[])
 		if(read_sb(sdp) < 0)
 			die("gfs: Error reading superblock.\n");
 
+		fix_device_geometry(sdp);
 		mount_gfs2_meta(sdp);
 
 		sprintf(rindex_name, "%s/rindex", sdp->metafs_path);



More information about the Cluster-cvs mailing list