Treat all devices at the container level as spares
Raid disk and disk number information is not relevant at the container level, especially for imsm. So arrange for getinfo_super_imsm() to always publish devices as spares and report the number of spares at Assemble() time. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
36ba7d4849
commit
57ed8c9155
|
@ -946,7 +946,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
|
|||
if (verbose >= 0) {
|
||||
fprintf(stderr, Name ": Container %s has been "
|
||||
"assembled with %d drive%s",
|
||||
mddev, okcnt, okcnt==1?"":"s");
|
||||
mddev, okcnt+sparecnt, okcnt+sparecnt==1?"":"s");
|
||||
if (okcnt < info.array.raid_disks)
|
||||
fprintf(stderr, " (out of %d)",
|
||||
info.array.raid_disks);
|
||||
|
|
|
@ -819,8 +819,6 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info)
|
|||
__u32 reserved = imsm_reserved_sectors(super, super->disks);
|
||||
|
||||
disk = &super->disks->disk;
|
||||
info->disk.number = super->disks->index;
|
||||
info->disk.raid_disk = super->disks->index;
|
||||
info->data_offset = __le32_to_cpu(disk->total_blocks) - reserved;
|
||||
info->component_size = reserved;
|
||||
s = __le32_to_cpu(disk->status);
|
||||
|
|
Loading…
Reference in New Issue