diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-10-01 18:50:44 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-10-15 14:43:57 -0700 |
commit | 36ba7d4849186b4c97bd6d5f905a390ff1de6f83 (patch) | |
tree | 4c06c8824d7e66b0153ab51c86dd10cd78c221cf /super-intel.c | |
parent | 27fd6274148a492a46fa11adcadc2d4079be6f67 (diff) | |
download | mdadm-36ba7d4849186b4c97bd6d5f905a390ff1de6f83.tar.gz mdadm-36ba7d4849186b4c97bd6d5f905a390ff1de6f83.tar.xz mdadm-36ba7d4849186b4c97bd6d5f905a390ff1de6f83.zip |
Allow a uuid of all f's to always match
The uuid returned for an imsm spare device will never match the uuid of an
active disk. So make mdadm interpret a uuid of all f's as "match any".
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c index 108f0b4..7962ac3 100644 --- a/super-intel.c +++ b/super-intel.c @@ -785,6 +785,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info) struct intel_super *super = st->sb; struct imsm_disk *disk; __u32 s; + int is_spare = 0; if (super->current_vol >= 0) { getinfo_super_imsm_volume(st, info); @@ -826,8 +827,13 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info) info->disk.state = s & CONFIGURED_DISK ? (1 << MD_DISK_ACTIVE) : 0; info->disk.state |= s & FAILED_DISK ? (1 << MD_DISK_FAULTY) : 0; info->disk.state |= s & USABLE_DISK ? (1 << MD_DISK_SYNC) : 0; + if (s & SPARE_DISK) + is_spare = 1; } - uuid_from_super_imsm(st, info->uuid); + if (is_spare) + memcpy(info->uuid, uuid_match_any, sizeof(int[4])); + else + uuid_from_super_imsm(st, info->uuid); } static int update_super_imsm(struct supertype *st, struct mdinfo *info, |