All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.4] sd terabyte disk fix
@ 2004-05-28  3:10 Brian King
  2004-05-28  3:26 ` James Bottomley
  0 siblings, 1 reply; 2+ messages in thread
From: Brian King @ 2004-05-28  3:10 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

James,

The following bug was hit when creating a hardware RAID array > 1 TB.
Please apply.

Thanks

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

[-- Attachment #2: sd_terabyte_disk.patch --]
[-- Type: text/plain, Size: 1349 bytes --]


This patch fixes a signed/unsigned bug that prevented > 1TB
scsi disks from working.


---

 linux-2.4.26-bjking1/drivers/scsi/sd.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -puN drivers/scsi/sd.c~sd_terabyte_disk drivers/scsi/sd.c
--- linux-2.4.26/drivers/scsi/sd.c~sd_terabyte_disk	2004-05-26 10:06:58.000000000 -0500
+++ linux-2.4.26-bjking1/drivers/scsi/sd.c	2004-05-27 22:05:32.000000000 -0500
@@ -294,7 +294,8 @@ static request_queue_t *sd_find_queue(kd
 
 static int sd_init_command(Scsi_Cmnd * SCpnt)
 {
-	int dev, block, this_count;
+	int dev, this_count;
+	unsigned int block;
 	struct hd_struct *ppnt;
 	Scsi_Disk *dpnt;
 #if CONFIG_SCSI_LOGGING
@@ -307,7 +308,7 @@ static int sd_init_command(Scsi_Cmnd * S
 	block = SCpnt->request.sector;
 	this_count = SCpnt->request_bufflen >> 9;
 
-	SCSI_LOG_HLQUEUE(1, printk("Doing sd request, dev = 0x%x, block = %d\n",
+	SCSI_LOG_HLQUEUE(1, printk("Doing sd request, dev = 0x%x, block = %u\n",
 	    SCpnt->request.rq_dev, block));
 
 	dpnt = &rscsi_disks[dev];
@@ -329,7 +330,7 @@ static int sd_init_command(Scsi_Cmnd * S
 		return 0;
 	}
 	SCSI_LOG_HLQUEUE(2, sd_devname(dev, nbuff));
-	SCSI_LOG_HLQUEUE(2, printk("%s : real dev = /dev/%d, block = %d\n",
+	SCSI_LOG_HLQUEUE(2, printk("%s : real dev = /dev/%d, block = %u\n",
 				   nbuff, dev, block));
 
 	/*

_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.4] sd terabyte disk fix
  2004-05-28  3:10 [PATCH 2.4] sd terabyte disk fix Brian King
@ 2004-05-28  3:26 ` James Bottomley
  0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2004-05-28  3:26 UTC (permalink / raw)
  To: Brian King; +Cc: SCSI Mailing List

On Thu, 2004-05-27 at 22:10, Brian King wrote:
> The following bug was hit when creating a hardware RAID array > 1 TB.
> Please apply.

Well, this is a known failing of 2.4;  It's not safe to promote block to
unsigned since there are many places in the filesystem and block code
where it gets used as a signed quantity.

If you want to use arrays >1TB, either use vanilla 2.6 with LBD support
enabled, or one of the vendor kernels with it backported.

James



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-28  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-28  3:10 [PATCH 2.4] sd terabyte disk fix Brian King
2004-05-28  3:26 ` James Bottomley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.