]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-intel.c
imsm: avoid overflows for disks over 1TB
authorCzarnowska, Anna <anna.czarnowska@intel.com>
Mon, 2 Apr 2012 00:15:03 +0000 (10:15 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 2 Apr 2012 00:15:03 +0000 (10:15 +1000)
commit5551b113dc18a6275fb04c7e7e3b76c656926e0a
tree4067f4b55db7442b2d518a745819d7a86a0ebe43
parentfd324b08dbfa8404558534dd0a2321213ffb7257
imsm: avoid overflows for disks over 1TB

Calculating array_blocks using info->size causes error on activation of
volume using disks over 1 TB. unsigned long long size parameter
is used instead.

total_blocks, pba_of_lba0, blocks_per_member and num_data_stripes overflow
when using disks over 2TB.

Part of fillers in metadata is used to contain hi bits of the numbers
that are likely to go over 32 bit limit.
Functions are added to get and set such fields as the hi bits are not
adjacent with low bits in the structures.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c