Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Nov 2002 20:35:47 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libdisk disk.c
Message-ID:  <20021103043547.GB2880@athlon.pn.xcllnt.net>
In-Reply-To: <20021103135904.L21845-100000@gamplex.bde.org>
References:  <200211030137.gA31b8mJ097733@repoman.freebsd.org> <20021103135904.L21845-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 03, 2002 at 02:08:46PM +1100, Bruce Evans wrote:
> >   Modified files:
> >     lib/libdisk          disk.c
> >   Log:
> >   Initialize d->bios_cyl. We know the media size in sectors, the number
> >   of heads end the number of sectors per track. If there's an obvious
> >   insanity (heads and sectors are both zero or the media size is not
> >   an integral multiple of heads times sector) we set the number of
> >   cylinders to zero.
> 
> The media size not being a multiple of heads times sector (sic) is
> normal, no insane, since the number of heads and sectors per track are
> nominal and not all media sizes have enough factors to be divisible
> by any possible and/or reasonable choices for the number of heads and
> sectors, and not all ****ware is dumbed down to pretend that the media
> size is smaller than it is so that it can have enough factors.

Technically speaking, yes. I think however that the media size
reported by GEOM is always the product of cyl, head and sect.
It doesn't necessarily match the true or actual size of the medium.

Note that even if I'm mistaken, this change doesn't cause different
behaviour in that case because the number of cylinders was always
0 prior to the change and it also means that the already missing
code to deal with the situation continues to be missing... We're
just less dependent on it. In fact all my tests now show a valid
geometry and size (where valid is defined as "it adds up" :-) on
all my disks.

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel@xcllnt.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021103043547.GB2880>