imsm: FIX: Use function to obtain array layout

Function imsm_level_to_layout() should be use to get array layout.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-06-14 12:42:08 +10:00 committed by NeilBrown
parent 80e4abc99c
commit 68eb8bc6ca
1 changed files with 2 additions and 4 deletions

View File

@ -7724,8 +7724,7 @@ int save_backup_imsm(struct supertype *st,
if (open_backup_targets(info, new_disks, targets)) if (open_backup_targets(info, new_disks, targets))
goto abort; goto abort;
if (map_dest->raid_level != 0) dest_layout = imsm_level_to_layout(map_dest->raid_level);
dest_layout = ALGORITHM_LEFT_ASYMMETRIC;
dest_chunk = __le16_to_cpu(map_dest->blocks_per_strip) * 512; dest_chunk = __le16_to_cpu(map_dest->blocks_per_strip) * 512;
if (restore_stripes(targets, /* list of dest devices */ if (restore_stripes(targets, /* list of dest devices */
@ -8772,8 +8771,7 @@ static int imsm_manage_reshape(
} }
max_position = sra->component_size * ndata; max_position = sra->component_size * ndata;
if (map_src->raid_level != 0) source_layout = imsm_level_to_layout(map_src->raid_level);
source_layout = ALGORITHM_LEFT_ASYMMETRIC;
while (__le32_to_cpu(migr_rec->curr_migr_unit) < while (__le32_to_cpu(migr_rec->curr_migr_unit) <
__le32_to_cpu(migr_rec->num_migr_units)) { __le32_to_cpu(migr_rec->num_migr_units)) {