]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdmon: resume rebuild
authorDan Williams <dan.j.williams@intel.com>
Tue, 16 Sep 2008 03:58:43 +0000 (20:58 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 16 Sep 2008 03:58:43 +0000 (20:58 -0700)
If we started a degraded array that was previously rebuilding we may
have enough information to resume the rebuild without a trip through the
monitor.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
managemon.c

index 15e431f7fb9b03976919e1108b10c0648c1ed65b..fc34d7789320cbcad13fef223d45b59826ba7c67 100644 (file)
@@ -475,8 +475,13 @@ static void manage_new(struct mdstat_ent *mdstat,
                        mdstat->metadata_version);
                new->container = NULL;
                free_aa(new);
-       } else
+       } else {
                replace_array(container, victim, new);
+               if (failed) {
+                       new->check_degraded = 1;
+                       manage_member(mdstat, new);
+               }
+       }
 }
 
 void manage(struct mdstat_ent *mdstat, struct supertype *container)