[PATCH 18/33] Removed uuid setting for imsm spares

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Czarnowska, Anna 
Sent: Monday, July 05, 2010 11:33 AM
To: Neil Brown
Cc: linux-raid@xxxxxxxxxxxxxxx; Czarnowska, Anna; Hawrylewicz Czarnowski, Przemyslaw; Labun, Marcin; Neubauer, Wojciech; Williams, Dan J; Ciechanowski, Ed; dledford@xxxxxxxxxx
Subject: [PATCH 18/33] Removed uuid setting for imsm spares

Setting UUID of a spare based on first array from config that may belong to different domain can prevent assembly of that array.

Signed-off-by: Anna Czarnowska <anna.czarnowska@xxxxxxxxx>
---
 super-intel.c |   34 +---------------------------------
 1 files changed, 1 insertions(+), 33 deletions(-)

diff --git a/super-intel.c b/super-intel.c index 9551ad1..4dcc654 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1495,38 +1495,6 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info)
      uuid_from_super_imsm(st, info->uuid);
 }
 
-/* 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_s *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);
 
@@ -1643,7 +1611,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info)
            uuid_from_super_imsm(st, info->uuid);
      else {
            memcpy(info->uuid, uuid_match_any, sizeof(int[4]));
-           fixup_container_spare_uuid(info);
+           /* must be uuid_match_any for spares to assemble */
      }
 }
 
--
1.6.4.2


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux