From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31450 invoked by alias); 2 Feb 2009 15:18:15 -0000 Received: (qmail 31444 invoked by alias); 2 Feb 2009 15:18:15 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,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: RHEL53 - 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/RHEL53 X-Git-Reftype: branch X-Git-Oldrev: 443747661081fc81d872e609585e831350fb0802 X-Git-Newrev: 6d221b0e4603b3f41fef4660846d06664e88dca5 From: Bob Peterson Message-Id: <20090202151749.6051B120597@lists.fedorahosted.org> Date: Mon, 02 Feb 2009 15:18: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/msg00365.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6d221b0e4603b3f41fef4660846d06664e88dca5 Commit: 6d221b0e4603b3f41fef4660846d06664e88dca5 Parent: 443747661081fc81d872e609585e831350fb0802 Author: Bob Peterson AuthorDate: Wed Jan 21 10:14:02 2009 -0600 Committer: Bob Peterson CommitterDate: Mon Feb 2 08:44:58 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);