]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Fix problems with array.size overflowing on large arrays.
authorNeil Brown <neilb@suse.de>
Mon, 28 Apr 2008 06:29:37 +0000 (16:29 +1000)
committerNeil Brown <neilb@suse.de>
Mon, 28 Apr 2008 06:29:37 +0000 (16:29 +1000)
commit7a3be72fc621b4a7589e923cf0652c51493f831a
treec2e88676f5be4205eab54fe9b71c43ec442b0ffd
parent2cdb64897d4fe33a11af13c6356dcd338c561e77
Fix problems with array.size overflowing on large arrays.

array.size is 32bits and counts K.  So for arrays with
more than 4Terrabytes, it can overflow.
The correct number can be read from sysfs, but there are still
a few places that use array.size and risk truncation.  What is worse.
they compare a number of kilobytes with a number of sectors !!

So use get_component_size() to read the sysfs information, and be
more consistent about units.
ChangeLog
Detail.c
Manage.c