patch-2.1.117 adds bad ide_xlate_1024()

Andries.Brouwer@cwi.nl
Sat, 22 Aug 1998 18:13:24 +0200 (MET DST)


In patch-2.1.117 there is the fragment
---------------------------------------------------------------
--- v2.1.115/linux/drivers/block/genhd.c Thu Aug 6 14:06:31 1998
+++ linux/drivers/block/genhd.c Sun Aug 16 11:48:40 1998
@@ -414,7 +414,8 @@
* This is necessary for drives for situations where
* the translated geometry is unavailable from the BIOS.
*/
- for (i = 0; i < 4 ; i++) {
+ int xlate_done = 0;
+ for (i = 0; i < 4 && !xlate_done; i++) {
struct partition *q = &p[i];
if (NR_SECTS(q)
&& (q->sector & 63) == 1
@@ -423,10 +424,16 @@
if (heads == 32 || heads == 64 || heads == 128\
|| heads == 255) {

(void) ide_xlate_1024(dev, heads, " [P\
TBL]");
- break;
+ xlate_done = 1;
}
}
}
+ if (!xlate_done) {
+ /*
+ * Default translation is equivalent of "BIOS LBA":
+ */
+ ide_xlate_1024(dev, -2, " [LBA]");
+ }
}
}
#endif /* CONFIG_BLK_DEV_IDE */
---------------------------------------------------------------

a very bad idea.
It decides that all disks should use a translated geometry. Why?
It makes fdisk complain.
It makes cfdisk exit with a fatal error.
It makes LILO unhappy.
It decreases the useful size of the disk.
It causes trouble for lots of people. For no reason I can see.

(For example, a 12 GB disk of mine went from 23361/16/63
to 1465/255/63, a loss of 6 MB. And there are files there.)

Unless someone comes with convincing arguments why this change
is a good idea, I think it should be undone.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html