]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
Assemble: fix --force assembly of v1.x arrays which are recovering.
[thirdparty/mdadm.git] / Assemble.c
index 7f900489bb19483bacf9fa15bb8cc97d5b0c083f..e4d61816369c2c0a0174e5c3da6eeda364d13925 100644 (file)
@@ -800,7 +800,8 @@ int Assemble(struct supertype *st, char *mddev,
                if (devices[j].i.events+event_margin >=
                    devices[most_recent].i.events) {
                        devices[j].uptodate = 1;
-                       if (i < content->array.raid_disks) {
+                       if (i < content->array.raid_disks &&
+                           devices[j].i.recovery_start == MaxSector) {
                                okcnt++;
                                avail[i]=1;
                        } else
@@ -822,6 +823,7 @@ int Assemble(struct supertype *st, char *mddev,
                        int j = best[i];
                        if (j>=0 &&
                            !devices[j].uptodate &&
+                           devices[j].i.recovery_start == MaxSector &&
                            (chosen_drive < 0 ||
                             devices[j].i.events
                             > devices[chosen_drive].i.events))