From: James Bottomley <James.Bottomley@SteelEye.com>
To: Dale Blount <linux-kernel@dale.us>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>,
scsi <linux-scsi@vger.kernel.org>, akpm <akpm@osdl.org>
Subject: Re: [PATCH] scsi disk: report size without overflow
Date: Sat, 22 Oct 2005 09:44:36 -0500 [thread overview]
Message-ID: <1129992276.3373.13.camel@mulgrave> (raw)
In-Reply-To: <1129928527.23920.62.camel@dale.velocity.net>
On Fri, 2005-10-21 at 17:02 -0400, Dale Blount wrote:
> I'll agree with that as well, but there should be a note left on
> CONFIG_LBD's help menu that states 1TB (or whatever the actual limit is)
> instead of 2TB then.
No one's really bothered to find out, I suspect. If the kernel is using
block offsets as all unsigned (which I'm not sure anyone's fully
validated), and the block size is 512, then 2TB is the limit. For
signed, which is a safer assumption, it's 1TB. However, you also have
the constant source of overflow danger, like you just discovered. Every
arithmetical calculation has to divide first then multiply (because the
reverse will overflow). Note also that fdisk overflows beyond a certain
point (which I suspect is also 1TB).
> Also are there any performance implications for using CONFIG_LBD?
Yes, on 32 bits sector_t becomes unsigned long long (a 64 bit quantity).
This takes double the storage (or registers). I don't think it will
affect storage performance any, but it increases the sizes in the kernel
and makes the processor do a bit more work.
James
next prev parent reply other threads:[~2005-10-22 14:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-21 3:55 [PATCH] scsi disk: report size without overflow Randy.Dunlap
2005-10-21 17:20 ` James Bottomley
2005-10-21 20:46 ` Randy.Dunlap
2005-10-21 21:02 ` Dale Blount
2005-10-22 14:44 ` James Bottomley [this message]
2005-10-21 21:17 ` James Bottomley
2005-10-22 2:24 ` Randy.Dunlap
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=1129992276.3373.13.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@dale.us \
--cc=linux-scsi@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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