summaryrefslogtreecommitdiff
path: root/super-intel.c
diff options
context:
space:
mode:
authorCzarnowska, Anna <anna.czarnowska@intel.com>2012-04-02 10:16:04 +1000
committerNeilBrown <neilb@suse.de>2012-04-02 10:16:04 +1000
commite03640bda562df11b60ceaaa40a56425f358090e (patch)
treecfdec611348d544c998695fb9b3ef95a3ee9954f /super-intel.c
parent97f81ee2635d8c1283ef857bc46d7314acffa1c3 (diff)
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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/super-intel.c b/super-intel.c
index 480b3793..642ca268 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 */