]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - managemon.c
mdmon: don't use 'ghost' values from an inactive array.
[thirdparty/mdadm.git] / managemon.c
index c245655733281aab5c86d42d4acc0ccf0065726c..f40bbdb3022f43b126d31bba4209c653ffde41ce 100644 (file)
@@ -450,9 +450,11 @@ static void manage_member(struct mdstat_ent *mdstat,
                /* Raced with something */
                return;
 
-       // FIXME
-       a->info.array.raid_disks = mdstat->raid_disks;
-       // MORE
+       if (mdstat->active) {
+               // FIXME
+               a->info.array.raid_disks = mdstat->raid_disks;
+               // MORE
+       }
 
        if (sysfs_get_ll(&a->info, NULL, "component_size", &component_size) >= 0)
                a->info.component_size = component_size << 1;