]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: check_secondary: fix treatment of missing BVDs
authormwilck@arcor.de <mwilck@arcor.de>
Wed, 3 Jul 2013 20:27:42 +0000 (22:27 +0200)
committerNeilBrown <neilb@suse.de>
Mon, 8 Jul 2013 05:28:31 +0000 (15:28 +1000)
Unused BVDs should just be skipped instead of bailing out.

Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index 91feb87cc97e663b19d82f87366f20dd80187168..c445df207cb7a000071ae515def4185794d41a9f 100644 (file)
@@ -3222,10 +3222,8 @@ static int check_secondary(const struct vcl *vc)
        __set_sec_seen(conf->sec_elmnt_seq);
        for (i = 0; i < conf->sec_elmnt_count-1; i++) {
                const struct vd_config *bvd = vc->other_bvds[i];
-               if (bvd == NULL) {
-                       pr_err("BVD %d is missing\n", i+1);
-                       return -1;
-               }
+               if (bvd == NULL)
+                       continue;
                if (bvd->srl != conf->srl) {
                        pr_err("Inconsistent secondary RAID level across BVDs\n");
                        return -1;