From owner-freebsd-current@FreeBSD.ORG Mon Sep 22 01:27:16 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A92D16A4B3 for ; Mon, 22 Sep 2003 01:27:16 -0700 (PDT) Received: from mail.ergobrains.co.jp (dns2.ergobrains.co.jp [61.204.41.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09E8143FF5 for ; Mon, 22 Sep 2003 01:27:15 -0700 (PDT) (envelope-from t-yonetani@ergobrains.co.jp) Received: from y0netan1 (d176.sys.p.ergobrains.co.jp [192.168.2.176]) by mail.ergobrains.co.jp (Postfix) with SMTP id 7E6298B808; Mon, 22 Sep 2003 17:27:12 +0900 (JST) Date: Mon, 22 Sep 2003 17:26:56 +0900 From: YONETANI Tomokazu To: freebsd-current@freebsd.org Message-ID: <20030922082656.GA56332@ergobrains.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i cc: t-yonetani@ergobrains.co.jp Subject: [PATCH] incorrect mediasize calculation in ips driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 22 Sep 2003 08:27:16 -0000 Hello. While trying to install recent snapshot of -CURRENT on Netfinity 6000R, sysinstall and other tools reported the size of RAID partition much smaller than expected. After looking into source code, I noticed a small bug in calculation of d_mediasize: Index: ips_disk.c =================================================================== RCS file: /home/cvs/freebsd/src/sys/dev/ips/ips_disk.c,v retrieving revision 1.3 diff -u -r1.3 ips_disk.c --- ips_disk.c 24 Aug 2003 17:49:14 -0000 1.3 +++ ips_disk.c 22 Sep 2003 07:19:46 -0000 @@ -139,7 +139,7 @@ dsc->ipsd_disk.d_fwsectors = IPS_COMP_SECTORS; } dsc->ipsd_disk.d_sectorsize = IPS_BLKSIZE; - dsc->ipsd_disk.d_mediasize = totalsectors * IPS_BLKSIZE; + dsc->ipsd_disk.d_mediasize = (off_t)totalsectors * IPS_BLKSIZE; disk_create(dsc->unit, &dsc->ipsd_disk, 0, NULL, NULL); device_printf(dev, "Logical Drive (%dMB)\n", Regards. -- YONETANI Tomokazu / Ergo-Brains Inc.