This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - Non-default block size confuses gfs2_grow


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9992f058d57385685d2a4d94c52aab13659805c0
Commit:        9992f058d57385685d2a4d94c52aab13659805c0
Parent:        60216578dc037040f9056115cabdbde89a6b94c9
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:46:51 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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]