Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Dec 2010 02:00:23 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Bruce Cran <bruce@cran.org.uk>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, Andriy Gapon <avg@freebsd.org>, Bruce Evans <brde@optusnet.com.au>, Bruce Cran <brucec@freebsd.org>, svn-src-head@freebsd.org, Matthew Jacob <mj@feral.com>
Subject:   Re: svn commit: r216269 - head/sys/geom/part
Message-ID:  <20101210010023.GA68703@owl.midgard.homeip.net>
In-Reply-To: <20101209221458.42448075@core.draftnet>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <brde@optusnet.com.au> 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.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



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