]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: write raid-disks should be less fatal.
authorNeilBrown <neilb@suse.de>
Tue, 2 Jul 2013 00:31:31 +0000 (10:31 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 2 Jul 2013 00:33:35 +0000 (10:33 +1000)
If the container metadata doesn't know how many device to expect (as
is the case with IMSM), don't fail an --assemble which over-specifies
the number of devices.

Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index cf7e44470442eb5ebf68a42881008ca1834d0154..a0041c6f11204c9f1ffc09dbffe0a73846d8bc28 100644 (file)
@@ -105,6 +105,7 @@ static int ident_matches(struct mddev_ident *ident,
                return 0;
        }
        if (ident->raid_disks != UnSet &&
+           content->array.raid_disks != 0 && /* metadata doesn't know how many to expect */
            ident->raid_disks!= content->array.raid_disks) {
                if (devname)
                        pr_err("%s requires wrong number of drives.\n",