lkml.org 
[lkml]   [2006]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Support HDIO_GETGEO on device-mapper volumes
Molle Bestefich wrote:
> It would be better to make the decision once and for all, in one place.
>
> It would be even better for the HDIO_GETGEO call to return the same
> geometry that the BIOS uses, so that Grub is handed numbers that
> actually mean *something*.
>

The problem is that the numbers don't actually mean anything, even to
the bios. They are only there for backward compatibility with real mode
software that makes int 13 calls. The bios just fakes the geometry
anyway so it can emulate something, but there really is no meaning to
the geometry; it's just smoke and mirrors.

In the case of dm, which geometry should it report? In some cases it
might make sense to pass up the values from the bios, but in most, there
is no sensible way to choose what to report, and any value you do report
is meaningless gibberish anyhow, so why bother at all? Just bring the
apps still using it ( grub, lilo ) into the 21st century and have them
stop using these meaningless values in the first place. LBA has been
around for a good 10 years now, so I think it is safe to no longer
require these made up values to support CHS addressing.
> When 'dmraid' has assembled an array, it should find the matching BIOS
> drive in /proc/bios/int13_dev* and then it should tell device-mapper
> to present that geometry to whomever asks via HDIO_GETGEO.
>
dmraid is only one client of the kernel device mapper. It has numerous
uses that have nothing to do with hardware fakeraid, including LVM. In
the special case of dmraid there is a bios int13 dev for the raid that
provides some geometry, but why hack dm for this special case when it is
totally unnecessary in the first place?
> And while we're at it, <some component> should do the same for eg.
> /dev/hd?. It's very annoying trying to fix up a harddrive's partition
> table when the numbers you see in Linux is different to the numbers
> you'll see when rebooting into DOS, or Windows XP, or whatever it is
> that's on the disk you're trying to fix.
> -
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-10 22:25    [W:0.064 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site