Big drives (>=64GB)

Tomasz Przygoda (Tomasz.Przygoda@securities.com)
Mon, 03 Aug 1998 20:39:42 -0400


Recently I had problem creating partitions with fdisk on big drives
(68GB and 92GB).

For all those who may run into similar problem, as well for those who
rule the kernel code:

--- linux/drivers/scsi/scsicam.c.orig Mon Jun 29 15:33:48 1998
+++ linux/drivers/scsi/scsicam.c Mon Jun 29 15:32:58 1998
@@ -45,6 +45,7 @@
struct buffer_head *bh;
int ret_code;
int size = disk->capacity;
+ unsigned long temp_cyl;

if (!(bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, 1024)))
return -1;
@@ -67,6 +68,11 @@
if (ret_code || ip[0] > 255 || ip[1] > 63) {
ip[0] = 64;
ip[1] = 32;
+ temp_cyl = size / (ip[0] * ip[1]);
+ if (temp_cyl > 65535) {
+ ip[0] = 255;
+ ip[1] = 63;
+ }
ip[2] = size / (ip[0] * ip[1]);
}

This seems to be acceptable solution (at least for me) - it got the job
done, and it looks like it didn't broke anything.

-- Tomek,
"Linux, WinNT and MS-DOS - the Good, the Bad and the Ugly"

-
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