Re: [PATCH] scsi disk: report size without overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux