]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: FIX: UT '08imsm-overlap' fails
authorWilliams, Dan J <dan.j.williams@intel.com>
Thu, 15 Dec 2011 02:21:07 +0000 (18:21 -0800)
committerNeilBrown <neilb@suse.de>
Mon, 19 Dec 2011 23:36:21 +0000 (10:36 +1100)
Make test for all sub arrays having the same number of devices
dependant on the option ROM requirements being checked.
08imsm-overlap disables the OROM check but then fails because this
test causes it to.

Reported-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index 9074485ab06d5295ea59a33d1a2d0e91985094f5..0e77537940cbbaff094932a7623d7e744ebd689a 100644 (file)
@@ -5314,12 +5314,6 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
 
        mpb = super->anchor;
 
-       if (mpb->num_raid_devs > 0 && mpb->num_disks != raiddisks) {
-               fprintf(stderr, Name ": the option-rom requires all "
-                       "member disks to be a member of all volumes.\n");
-               return 0;
-       }
-
        if (!validate_geometry_imsm_orom(super, level, layout, raiddisks, chunk, verbose)) {
                fprintf(stderr, Name ": RAID gemetry validation failed. "
                        "Cannot proceed with the action(s).\n");
@@ -5398,6 +5392,11 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
                fprintf(stderr, Name ": The option-rom requires all member"
                        " disks to be a member of all volumes\n");
                return 0;
+       } else if (super->orom && mpb->num_raid_devs > 0 &&
+                  mpb->num_disks != raiddisks) {
+               fprintf(stderr, Name ": The option-rom requires all member"
+                       " disks to be a member of all volumes\n");
+               return 0;
        }
 
        /* retrieve the largest free space block */