Date: Mon, 22 Sep 2003 17:26:56 +0900 From: YONETANI Tomokazu <t-yonetani@ergobrains.co.jp> To: freebsd-current@freebsd.org Cc: t-yonetani@ergobrains.co.jp Subject: [PATCH] incorrect mediasize calculation in ips driver Message-ID: <20030922082656.GA56332@ergobrains.co.jp>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030922082656.GA56332>