From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9436 invoked by alias); 29 Jan 2009 23:55:01 -0000 Received: (qmail 9430 invoked by alias); 29 Jan 2009 23:55:00 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com Subject: cluster: RHEL5 - Non-default block size confuses gfs2_grow To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/RHEL5 X-Git-Reftype: branch X-Git-Oldrev: abc821302a61ae9031f0897072b67efaa1e803b8 X-Git-Newrev: ed7b4cbf776bf0f209f0fe3b30841ae1f0c415cb From: Bob Peterson Message-Id: <20090129235434.1BEDB12047A@lists.fedorahosted.org> Date: Thu, 29 Jan 2009 23:55:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00318.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ed7b4cbf776bf0f209f0fe3b30841ae1f0c415cb Commit: ed7b4cbf776bf0f209f0fe3b30841ae1f0c415cb Parent: abc821302a61ae9031f0897072b67efaa1e803b8 Author: Bob Peterson AuthorDate: Wed Jan 21 10:14:02 2009 -0600 Committer: Bob Peterson CommitterDate: Thu Jan 29 17:53:46 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 2ac6e78..39989e6 100644 --- a/gfs2/mkfs/main_grow.c +++ b/gfs2/mkfs/main_grow.c @@ -282,7 +282,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); @@ -294,6 +293,7 @@ main_grow(int argc, char *argv[]) if(read_sb(sdp) < 0) die("gfs: Error reading superblock.\n"); + fix_device_geometry(sdp); if (!find_gfs2_meta(sdp)) mount_gfs2_meta(sdp); lock_for_admin(sdp);