Assemble: allow to assemble container with uuid=0:0:0:0

When there are any arrays in config file the spares with
domain not matching any array are not assembled because
auto assembly is not attempted.
Addition of ARRAY line with uuid=0:0:0:0 in config will work
with modified condition for gathering spares.

Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Czarnowska, Anna 2011-02-01 10:40:56 +11:00 committed by NeilBrown
parent bfd76b9309
commit 3c7b4a2595
1 changed files with 4 additions and 1 deletions

View File

@ -564,7 +564,10 @@ int Assemble(struct supertype *st, char *mddev,
}
/* Check if we found some imsm spares but no members */
if (auto_assem && (!st || !st->sb))
if ((auto_assem ||
(ident->uuid_set &&
memcmp(uuid_zero, ident->uuid,sizeof(uuid_zero)) == 0)) &&
(!st || !st->sb))
for (tmpdev = devlist; tmpdev; tmpdev = tmpdev->next) {
if (tmpdev->used != 3)
continue;