imsm: FIX: array size is wrong

Calculation of size is almost ok, except concept of blocks.
Size for setting in md has to be divided by 2 to be correct.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-02-03 17:40:18 +11:00 committed by NeilBrown
parent 6d4225a131
commit 02eedb57aa
1 changed files with 2 additions and 2 deletions

View File

@ -549,9 +549,9 @@ static void manage_member(struct mdstat_ent *mdstat,
disk_init_and_add(newd, d, newa);
}
if (sysfs_get_ll(info, NULL, "array_size", &array_size) == 0
&& a->info.custom_array_size > array_size) {
&& a->info.custom_array_size > array_size*2) {
sysfs_set_num(info, NULL, "array_size",
a->info.custom_array_size);
a->info.custom_array_size/2);
}
out2:
sysfs_free(info);