imsm: fix setting of device size for raid1
When chunksize is 0 in the raid1 case we need to use info_to_blocks_per_member() to calculate the array size. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
959278735e
commit
03bcbc654f
|
@ -1816,6 +1816,9 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
|
|||
return 0;
|
||||
}
|
||||
strncpy((char *) dev->volume, name, MAX_RAID_SERIAL_LEN);
|
||||
if (info->level == 1)
|
||||
array_blocks = info_to_blocks_per_member(info);
|
||||
else
|
||||
array_blocks = calc_array_size(info->level, info->raid_disks,
|
||||
info->layout, info->chunk_size,
|
||||
info->size*2);
|
||||
|
|
Loading…
Reference in New Issue