lkml.org 
[lkml]   [1998]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectBig drives (>=64GB)
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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.053 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site