From owner-freebsd-current@FreeBSD.ORG Fri May 11 13:20:41 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2316A16A403 for ; Fri, 11 May 2007 13:20:41 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh2.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id E7F4713C4B0 for ; Fri, 11 May 2007 13:20:40 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from neutrino.centtech.com (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.8/8.13.8) with ESMTP id l4BDKcCU034548; Fri, 11 May 2007 08:20:38 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <46446DA6.8060801@freebsd.org> Date: Fri, 11 May 2007 08:20:38 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.0 (X11/20070420) MIME-Version: 1.0 To: Lukas Ertl References: <4F9C9299A10AE74E89EA580D14AA10A61A172F@royal64.emp.zapto.org> <4642E481.9070109@freebsd.org> In-Reply-To: <4642E481.9070109@freebsd.org> Content-Type: multipart/mixed; boundary="------------060201040901000602080506" X-Virus-Scanned: ClamAV 0.88.4/3227/Fri May 11 04:39:25 2007 on mh2.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh2.centtech.com Cc: freebsd-current@freebsd.org, Daniel Eriksson Subject: Re: growfs reporting negative sectors beyond 2^31 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 13:20:41 -0000 This is a multi-part message in MIME format. --------------060201040901000602080506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 05/10/07 04:23, Lukas Ertl wrote: > Daniel Eriksson wrote: >> While playing around with growfs I noticed that it prints the sector >> numbers for the super-block backups on sectors beyond 2^31 as negative >> numbers. I ran into this issue while trying to grow a 1TB filesystem to >> a 1.5TB filesystem. >> >> Example: >> [snip] >> 2142948448, 2143324800, 2143701152, 2144077504, 2144453856, 2144830208, >> 2145206560, 2145582912, 2145959264, >> 2146335616, 2146711968, 2147088320, 2147464672, -2147126272, >> -2146749920, -2146373568, -2145997216, -2145620864, >> -2145244512, -2144868160, -2144491808, -2144115456, -2143739104, >> -2143362752, -2142986400, -2142610048, -2142233696, >> [snip] >> >> Is this something to worry about as far as file system consistency goes, >> or is it just a cosmetic problem with the printout? > > It's just cosmetic, as far as I can see. > > cheers, > le > I think this patch fixes it. http://www.googlebit.com/freebsd/patches/growfs-bigdisk-patch Eric --------------060201040901000602080506 Content-Type: text/plain; name="growfs-bigdisk-patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="growfs-bigdisk-patch" Index: sbin/growfs/growfs.c =================================================================== RCS file: /alt/ncvs/src/sbin/growfs/growfs.c,v retrieving revision 1.25 diff -u -r1.25 growfs.c --- sbin/growfs/growfs.c 17 Jul 2006 20:48:36 -0000 1.25 +++ sbin/growfs/growfs.c 11 May 2007 13:17:43 -0000 @@ -259,8 +259,8 @@ */ for (cylno = osblock.fs_ncg; cylno < sblock.fs_ncg; cylno++) { initcg(cylno, utime, fso, Nflag); - j = sprintf(tmpbuf, " %d%s", - (int)fsbtodb(&sblock, cgsblock(&sblock, cylno)), + j = sprintf(tmpbuf, " %jd%s", + (intmax_t)fsbtodb(&sblock, cgsblock(&sblock, cylno)), cylno < (sblock.fs_ncg-1) ? "," : "" ); if (i + j >= width) { printf("\n"); --------------060201040901000602080506--