]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Incr/spare: make sure failure to identify metadata if handled gracefully.
authorNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 09:58:06 +0000 (20:58 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 09:58:06 +0000 (20:58 +1100)
Signed-off-by: NeilBrown <neilb@suse.de>
Incremental.c

index 44e83ba33da7698d8f2d0d80fb62d085b1fe9938..de7fa6f02f97abbd72fc3fc3816515db75fd5bfb 100644 (file)
@@ -820,6 +820,13 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
                        for(i=0; !st2 && superlist[i]; i++)
                                st2 = superlist[i]->match_metadata_desc(
                                        sra->text_version);
+                       if (!st2) {
+                               if (verbose > 1)
+                                       fprintf(stderr, Name ": not adding %s to %s"
+                                               " as metadata not recognised.\n",
+                                               devname, mp->path);
+                               goto next;
+                       }
                } else
                        st2 = st;
                get_dev_size(dfd, NULL, &devsize);