]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: get content before testing it.
authorNeilBrown <neilb@suse.de>
Tue, 23 Nov 2010 00:34:36 +0000 (11:34 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 23 Nov 2010 00:34:36 +0000 (11:34 +1100)
When checking that a container matches the required uuid,
we need to call 'getinfo_super' before we have a 'content'
to test.

Reported-by: "Czarnowska, Anna" <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 1a1e1286db6f9e186be2da6136467b8da869a5fe..607f2afc0a89ea3503cc740d75519c4f4caa1d1f 100644 (file)
@@ -409,6 +409,11 @@ int Assemble(struct supertype *st, char *mddev,
                                if (ident->container[0] != '/') {
                                        /* we have a uuid */
                                        int uuid[4];
+
+                                       content = &info;
+                                       memset(content, 0, sizeof(*content));
+                                       tst->ss->getinfo_super(tst, content, NULL);
+
                                        if (!parse_uuid(ident->container, uuid) ||
                                            !same_uuid(content->uuid, uuid, tst->ss->swapuuid)) {
                                                if (report_missmatch)