public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE2 - Non-default block size confuses gfs2_grow
@ 2009-01-21 16:43 Bob Peterson
  0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2009-01-21 16:43 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6de42139dae71500a35e0bbfeb978f00810cc999
Commit:        6de42139dae71500a35e0bbfeb978f00810cc999
Parent:        d344235e3e6a7624d0189b0736775476471dfd0e
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:40:23 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-21 16:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-21 16:43 cluster: STABLE2 - Non-default block size confuses gfs2_grow Bob Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).