From owner-cvs-all Sat Nov 2 20:35:56 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A582737B406; Sat, 2 Nov 2002 20:35:55 -0800 (PST) Received: from kayak.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37BDA43E3B; Sat, 2 Nov 2002 20:35:54 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by kayak.xcllnt.net (8.12.6/8.12.6) with ESMTP id gA34Zm0N091786; Sat, 2 Nov 2002 20:35:48 -0800 (PST) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id gA34ZmFE002998; Sat, 2 Nov 2002 20:35:48 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id gA34ZlUT002997; Sat, 2 Nov 2002 20:35:47 -0800 (PST) Date: Sat, 2 Nov 2002 20:35:47 -0800 From: Marcel Moolenaar To: Bruce Evans 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> References: <200211030137.gA31b8mJ097733@repoman.freebsd.org> <20021103135904.L21845-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021103135904.L21845-100000@gamplex.bde.org> User-Agent: Mutt/1.5.1i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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