From owner-freebsd-hackers Sun Mar 16 10:16:11 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id KAA11419 for hackers-outgoing; Sun, 16 Mar 1997 10:16:11 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA11414 for ; Sun, 16 Mar 1997 10:16:07 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id FAA10848; Mon, 17 Mar 1997 05:14:38 +1100 Date: Mon, 17 Mar 1997 05:14:38 +1100 From: Bruce Evans Message-Id: <199703161814.FAA10848@godzilla.zeta.org.au> To: dgy@rtd.com, helbig@MX.BA-Stuttgart.De Subject: Re: wd driver questions Cc: hackers@FreeBSD.org Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >> And, how (if at all) does the geometry written to the disklabel >> figure into the operation/calculations of the driver? > >As far as I could decipher from the driver code (wd.c) the probed geometry >is used only to read the label. No, the probed geometry is used for everything in the driver. >From there on the geometry read from the >label is used exclusively by the driver. Both are the same, if you >disklabel auto. The geometry read from the label is not used by the driver (except in `#if 0' code). It is normally only used by fdisk. newfs ignores it by default. The BIOS geometry is not used either, except in some kludgy cases involving drives that don't report their geometry (old MFM drives). Old versions of the driver worked like you thought, except for complications. First the MBR was read and the BIOS geometry was guessed from it. The the drive was programmed to use the guessed BIOS geometry. Then the label and possibly the bad block table was read. Then the drive was programmed to use the geometry in the label. There were many driver bugs (all of this must be done atomically, and some of it must be redone after drive reset ...). There were many configuration errors (it was possible to put a physically impossible. or just inconsistent, geometry in the label ...). Bruce