summaryrefslogtreecommitdiff
path: root/super-intel.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-27 16:11:48 +1000
committerNeilBrown <neilb@suse.de>2011-07-27 16:11:48 +1000
commit656b6b5a55adb1fd223d82478c333264af52877a (patch)
tree15cc412dfa7a3ccd7e37ea35c0d787afb02ad647 /super-intel.c
parent9ab6e80a04532e55eb58ea4d320ed1104c8df1d6 (diff)
IMSM: set ->raid_disk correctly in getinfo_super_imsm_volume
The 'raid_disk' can be different to the 'number' and must be the position of the device in the array, not in the container. Normally these should not be different, but the test-suite creates a possibility so it should work. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/super-intel.c b/super-intel.c
index b4540137..dcab5f9b 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2268,7 +2268,8 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
info->disk.major = dl->major;
info->disk.minor = dl->minor;
info->disk.number = dl->index;
- info->disk.raid_disk = dl->index;
+ info->disk.raid_disk = get_imsm_disk_slot(map_to_analyse,
+ dl->index);
}
info->data_offset = __le32_to_cpu(map_to_analyse->pba_of_lba0);
@@ -4330,7 +4331,7 @@ static int add_to_super_imsm_volume(struct supertype *st, mdu_disk_info_t *dk,
devname);
return 1;
}
- set_imsm_ord_tbl_ent(map, dk->number, dl->index);
+ set_imsm_ord_tbl_ent(map, dk->raid_disk, dl->index);
dl->disk.status = CONFIGURED_DISK;
/* if we are creating the first raid device update the family number */