From owner-svn-src-all@FreeBSD.ORG Fri Dec 10 01:07:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61186106566B for ; Fri, 10 Dec 2010 01:07:23 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id E07FB8FC0A for ; Fri, 10 Dec 2010 01:07:22 +0000 (UTC) Received: from c83-255-61-120.bredband.comhem.se ([83.255.61.120]:64689 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1PQrRx-0004mF-9M for svn-src-all@freebsd.org; Fri, 10 Dec 2010 02:07:08 +0100 Received: (qmail 77491 invoked from network); 10 Dec 2010 02:00:23 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 10 Dec 2010 02:00:23 +0100 Received: (qmail 68782 invoked by uid 1001); 10 Dec 2010 02:00:23 +0100 Date: Fri, 10 Dec 2010 02:00:23 +0100 From: Erik Trulsson To: Bruce Cran Message-ID: <20101210010023.GA68703@owl.midgard.homeip.net> References: <201012072046.oB7KkB4L079555@svn.freebsd.org> <4CFEAD09.30904@freebsd.org> <4CFEAFA6.4020103@feral.com> <4CFEB1AD.70906@freebsd.org> <20101208153857.H1428@besplex.bde.org> <20101208225235.501ced0e@core.draftnet> <20101209191657.B1400@besplex.bde.org> <20101209221458.42448075@core.draftnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101209221458.42448075@core.draftnet> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: 83.255.61.120 X-Scan-Result: No virus found in message 1PQrRx-0004mF-9M. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1PQrRx-0004mF-9M 693c71ae6f2065223c303eb2a44a523e Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Andriy Gapon , Bruce Evans , Bruce Cran , svn-src-head@freebsd.org, Matthew Jacob Subject: Re: svn commit: r216269 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2010 01:07:23 -0000 On Thu, Dec 09, 2010 at 10:14:58PM +0000, Bruce Cran wrote: > On Thu, 9 Dec 2010 19:58:56 +1100 (EST) > Bruce Evans wrote: > > > I had understood the ATA_FLAG_54_58 backwards. It tells us if the > > drive is not so old that it doesn't support IDENTIFY records for > > words 54-58. I think we rarely get here. Drives old enough to use > > CHS may be so old that they don't support words 54-58. Only drives > > manufactured during a few years or months in the 1990's will support > > words 54-58 but not LBA. Maybe I'm misremembering the length of this > > time. > > All modern drives (including ATA-8) seem to support reporting the > current CHS geometry, so FreeBSD will use this for the geometry; > however since when the BIOS chooses to use LBA mode the "current > geometry" words aren't updated I think we use the wrong geometry on > modern drives. Modern drives do not really report 'the current CHS geometry'. They report a fake geometry that normally do not have anything do with the actual geometry. (As an example just about all modern ATA/SATA drives report having 16 heads, while in reality none of them have more than 10 heads and most of them have fewer heads than that.) Finding out the real geometry of a disk is generally not possible and typically cannot even be expressed with a simple C/H/S scheme, since the 'S' component is usually not a constant. (Modern drives put more sectors per track on the outer tracks than on the inner tracks.) The only reason for actually using the geometry reported by the disk for anything is if you need to have the partitioning of the disk compatible with some other OS which does use the reported CHS values. (E.g. if you have a dual-boot machine where FreeBSD shares the disk with some other OS that insists on having partitions start exactly on a track boundary, then FreeBSD would need to handle that somehow.) But even then you are not really interested in using the 'correct' geometry, but rather in using whatever geometry that other OS is using. -- Erik Trulsson ertr1013@student.uu.se