diff options
author | Czarnowska, Anna <anna.czarnowska@intel.com> | 2012-04-02 10:16:04 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-04-02 10:16:04 +1000 |
commit | e03640bda562df11b60ceaaa40a56425f358090e (patch) | |
tree | cfdec611348d544c998695fb9b3ef95a3ee9954f /super-intel.c | |
parent | 97f81ee2635d8c1283ef857bc46d7314acffa1c3 (diff) | |
download | mdadm-e03640bda562df11b60ceaaa40a56425f358090e.tar.gz |
simplify calculating array_blocks
no point calling info_to_blocks_per_member when it just returns size*2 for level==1
calc_array_size can be used for all levels
Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/super-intel.c b/super-intel.c index 480b379..642ca26 100644 --- a/super-intel.c +++ b/super-intel.c @@ -4623,10 +4623,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info, } strncpy((char *) dev->volume, name, MAX_RAID_SERIAL_LEN); - if (info->level == 1) - array_blocks = info_to_blocks_per_member(info, size); - else - array_blocks = calc_array_size(info->level, info->raid_disks, + array_blocks = calc_array_size(info->level, info->raid_disks, info->layout, info->chunk_size, size * 2); /* round array size down to closest MB */ |