Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: akpm@osdl.org, linux-scsi@vger.kernel.org
Subject: PATCH: Bogus disk geometry on large disks
Date: Fri, 26 May 2006 17:29:25 +0100	[thread overview]
Message-ID: <1148660965.20856.35.camel@localhost.localdomain> (raw)

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 */


             reply	other threads:[~2006-05-26 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-26 16:29 Alan Cox [this message]
2006-05-26 17:57 ` PATCH: Bogus disk geometry on large disks Matthew Wilcox
2006-05-26 18:22   ` Alan Cox
2006-05-26 18:20     ` Matthew Wilcox
2006-05-26 19:57       ` Doug Maxey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1148660965.20856.35.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox