summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-06-14 12:42:08 +1000
committerNeilBrown <neilb@suse.de>2011-06-14 12:42:08 +1000
commit68eb8bc6cac325ed635dccd69b638bf1b46449ef (patch)
tree0b6cbe978f265217ebb7a0e8385d2d6806bdb5e0
parent80e4abc99c7f5a16c56c1c4084bfad63aec03c01 (diff)
downloadmdadm-68eb8bc6cac325ed635dccd69b638bf1b46449ef.tar.gz
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>
-rw-r--r--super-intel.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/super-intel.c b/super-intel.c
index 5c840ec..4f674bf 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7724,8 +7724,7 @@ int save_backup_imsm(struct supertype *st,
if (open_backup_targets(info, new_disks, targets))
goto abort;
- if (map_dest->raid_level != 0)
- dest_layout = ALGORITHM_LEFT_ASYMMETRIC;
+ dest_layout = imsm_level_to_layout(map_dest->raid_level);
dest_chunk = __le16_to_cpu(map_dest->blocks_per_strip) * 512;
if (restore_stripes(targets, /* list of dest devices */
@@ -8772,8 +8771,7 @@ static int imsm_manage_reshape(
}
max_position = sra->component_size * ndata;
- if (map_src->raid_level != 0)
- source_layout = ALGORITHM_LEFT_ASYMMETRIC;
+ source_layout = imsm_level_to_layout(map_src->raid_level);
while (__le32_to_cpu(migr_rec->curr_migr_unit) <
__le32_to_cpu(migr_rec->num_migr_units)) {