...Thats why I said i didn't want to start another geometry war. But
then again, I did write RFC too, yes?
Yes, geometry is a fiction. And a bad one at that. To be honest I'd
rather get rid of it completely. But you said it: The geometry still
exists for the sake of backward compatibility. If it is still there, why
not export it? That's what sysfs is for...
Additionally have a look at libata-scsi.c which is part of the SATAThe geometry expressed in the partition table by whatever utility created it will be the geometry that the bios reported the disk had at the time the tool created the MBR, which can change if you plug the disk into another machine with different bios. If there is already geometry in the MBR, then you should use those values and take them at face value.
implementation. Theres CHS code in there...
Personally I want the geometry information in sysfs because debugging
partition tables not written by linux tools becomes just that tad more
easier...
I did not say I'd implement it for _all_ devices. In fact I indent toAFAIK, most drivers do provide a getgeo function... but do they get the information from the bios at boot time, or do they make it up? If it is just made up anyhow, then why bother? I am not sure how it could even be possible to get the information from the bios at boot time, and figure out the correct mapping between bios devices and the real hardware, which the driver is talking to. Since the geometry is entirely made up anyhow why bother asking the driver to make it up when that can be done in user space just as easily?
make geometry available only for devices whose drivers provide the
getgeo function.
Exactly. I don't want the kernel to fix BIOS problems. But i want toBut neither one is any more correct than the other. Both are bogus values, so what does it matter which is used? What good would having this value stored in the kernel do? The kernel itself does not use it. User mode tools that for some reason need to talk about it can just use the values stored in the MBR.
give userland the opportunity to overwrite what the kernel thinks (as in
/proc/ide/hdx/settings).
One example where this might be usable is connecting a PATA drive using
an Adapter to SATA. PATA returns the drive's geometry. SATA defaults to
x/255/63...