On Thu, May 13, 2004 at 03:58:02PM +0300, Alex Lyashkov wrote: +> > This sector size is valid and shouldn't be rejected. +> > This patch works for me: +> > +> > http://people.freebsd.org/~pjd/patches/md.c.3.patch +> in patch +> + sc->nsect = (mdio->md_size * DEV_BSIZE) / sc->secsize; +> why not +> + sc->nsect = (mdio->md_size / sc->secsize ) * DEV_BSIZE ; +> +> for avoid posible overflow in mdio->md_size * DEV_BSIZE
But your fix is incorrect: mdio->md_size = 20 sc->secsize = 512 In my version: sc->nsect = (20 * 512) / 512 = 20 In your version: sc->nsect = (20 / 512) * 512 = 0 -- Pawel Jakub Dawidek http://www.FreeBSD.org [EMAIL PROTECTED] http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am!
pgp00000.pgp
Description: PGP signature