All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: Bogus disk geometry on large disks
@ 2006-05-26 16:29 Alan Cox
  2006-05-26 17:57 ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2006-05-26 16:29 UTC (permalink / raw)
  To: akpm, linux-scsi

We currently stuff a truncated size into the geometry logic and return
the result which can produce bizarre reports for a 4Tb array. Since that
mapping logic isn't useful for disks that big don't try and map this way
at all.

Signed-off-by: Alan Cox <alan@redhat.com>

--- libata-ref/drivers/scsi/scsicam.c	2006-05-23 13:05:45.000000000 +0100
+++ libata-dev/drivers/scsi/scsicam.c	2006-05-24 01:07:57.541182984 +0100
@@ -68,7 +68,7 @@
 			       (unsigned int *)ip + 0, (unsigned int *)ip + 1);
 	kfree(p);
 
-	if (ret == -1) {
+	if (ret == -1 && capacity < (1ULL << 32)) {
 		/* pick some standard mapping with at most 1024 cylinders,
 		   and at most 62 sectors per track - this works up to
 		   7905 MB */


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

end of thread, other threads:[~2006-05-26 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-26 16:29 PATCH: Bogus disk geometry on large disks Alan Cox
2006-05-26 17:57 ` Matthew Wilcox
2006-05-26 18:22   ` Alan Cox
2006-05-26 18:20     ` Matthew Wilcox
2006-05-26 19:57       ` Doug Maxey

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.