]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: we need to read policy to know array domains
authorAnna Czarnowska <anna.czarnowska@intel.com>
Wed, 5 Jan 2011 02:42:59 +0000 (13:42 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 5 Jan 2011 02:42:59 +0000 (13:42 +1100)
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>
Assemble.c

index 5725b2323d4a9a09849fc96399cfbae998876f79..7ef9dc3e50b99be2d537d403d18d618a9b564d96 100644 (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)