diff options
author | NeilBrown <neilb@suse.de> | 2011-09-10 17:21:28 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-09-10 17:21:28 +1000 |
commit | 27a7b260f71439c40546b43588448faac01adb93 (patch) | |
tree | 80fdd39a446f93fa84a355cf4d0118244b4d7fd6 /block | |
parent | 079fa166a2874985ae58b2e21e26e1cbc91127d4 (diff) |
md: Fix handling for devices from 2TB to 4TB in 0.90 metadata.
0.90 metadata uses an unsigned 32bit number to count the number of
kilobytes used from each device.
This should allow up to 4TB per device.
However we multiply this by 2 (to get sectors) before casting to a
larger type, so sizes above 2TB get truncated.
Also we allow rdev->sectors to be larger than 4TB, so it is possible
for the array to be resized larger than the metadata can handle.
So make sure rdev->sectors never exceeds 4TB when 0.90 metadata is in
used.
Also the sanity check at the end of super_90_load should include level
1 as it used ->size too. (RAID0 and Linear don't use ->size at all).
Reported-by: Pim Zandbergen <P.Zandbergen@macroscoop.nl>
Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions