imsm: return associated uuid for spares
This prevents a uuid of all f's from being displayed when an imsm spare is listed along with active disks for mdadm -Eb. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
032e9e2953
commit
a575e2a7cd
|
@ -825,7 +825,11 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info)
|
|||
info->disk.state |= s & FAILED_DISK ? (1 << MD_DISK_FAULTY) : 0;
|
||||
info->disk.state |= s & SPARE_DISK ? 0 : (1 << MD_DISK_SYNC);
|
||||
}
|
||||
if (info->disk.state & (1 << MD_DISK_SYNC))
|
||||
|
||||
/* only call uuid_from_super_imsm when this disk is part of a populated container,
|
||||
* ->compare_super may have updated the 'num_raid_devs' field for spares
|
||||
*/
|
||||
if (info->disk.state & (1 << MD_DISK_SYNC) || super->anchor->num_raid_devs)
|
||||
uuid_from_super_imsm(st, info->uuid);
|
||||
else
|
||||
memcpy(info->uuid, uuid_match_any, sizeof(int[4]));
|
||||
|
|
Loading…
Reference in New Issue