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>
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);
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 */