Assemble: we need to read policy to know array domains

Policy must be read on all disks identified as array members
to get array's domains list.
Currently it is only read on first array member in auto assembly mode.

Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Anna Czarnowska 2011-01-05 13:42:59 +11:00 committed by NeilBrown
parent fee6a49ee8
commit 26b05aeaed
1 changed files with 4 additions and 1 deletions

View File

@ -546,8 +546,11 @@ int Assemble(struct supertype *st, char *mddev,
}
loop:
/* Collect domain information from members only */
if (tmpdev && tmpdev->used == 1)
if (tmpdev && tmpdev->used == 1) {
if (!pol)
pol = devnum_policy(stb.st_rdev);
domain_merge(&domains, pol, tst?tst->ss->name:NULL);
}
dev_policy_free(pol);
pol = NULL;
if (tst)