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

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);


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

only message in thread, other threads:[~2009-01-21 16:33 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:33 gfs2-utils: master - 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).