[PATCH] incorrect mediasize calculation in ips driver
YONETANI Tomokazu
t-yonetani at ergobrains.co.jp
Mon Sep 22 01:27:16 PDT 2003
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.
More information about the freebsd-current
mailing list