summaryrefslogtreecommitdiff
path: root/super-intel.c
diff options
context:
space:
mode:
authorAnna Czarnowska <anna.czarnowska@intel.com>2010-12-26 21:59:31 +1100
committerNeilBrown <neilb@suse.de>2010-12-26 21:59:31 +1100
commit22e263f64a7c1075f162615b700676514efca3c5 (patch)
tree2660519e0321bd5d1eac471d937ad34dbd5f66b3 /super-intel.c
parent4f8a3e5baf77a3951b42d9522d75f0e7915912ec (diff)
imsm: set imsm spare uuid to 0
uuid_match_any is replaced by uuid_zero for imsm spares. Function fixup_container_spare_uuid not needed as it gives unwanted uuid to spares. Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/super-intel.c b/super-intel.c
index adb85b23..c4100efc 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1625,38 +1625,6 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
}
}
-/* check the config file to see if we can return a real uuid for this spare */
-static void fixup_container_spare_uuid(struct mdinfo *inf)
-{
- struct mddev_ident *array_list;
-
- if (inf->array.level != LEVEL_CONTAINER ||
- memcmp(inf->uuid, uuid_match_any, sizeof(int[4])) != 0)
- return;
-
- array_list = conf_get_ident(NULL);
-
- for (; array_list; array_list = array_list->next) {
- if (array_list->uuid_set) {
- struct supertype *_sst; /* spare supertype */
- struct supertype *_cst; /* container supertype */
-
- _cst = array_list->st;
- if (_cst)
- _sst = _cst->ss->match_metadata_desc(inf->text_version);
- else
- _sst = NULL;
-
- if (_sst) {
- memcpy(inf->uuid, array_list->uuid, sizeof(int[4]));
- free(_sst);
- break;
- }
- }
- }
-}
-
-
static __u8 imsm_check_degraded(struct intel_super *super, struct imsm_dev *dev, int failed);
static int imsm_count_failed(struct intel_super *super, struct imsm_dev *dev);
@@ -1771,10 +1739,8 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *
*/
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]));
- fixup_container_spare_uuid(info);
- }
+ else
+ memcpy(info->uuid, uuid_zero, sizeof(uuid_zero));
/* I don't know how to compute 'map' on imsm, so use safe default */
if (map) {