]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Don't consider disks with a valid recovery offset as candidates for bumping up event...
authorAlexander Lyakas <alex.bolshoy@gmail.com>
Sun, 13 May 2012 07:10:43 +0000 (10:10 +0300)
committerNeilBrown <neilb@suse.de>
Tue, 15 May 2012 04:20:42 +0000 (14:20 +1000)
When we are looking for a candidate disk to bump up the event count,
we consider only disks that have recovery_start==MaxSector.
However, after we find one such disk, we agree to accept more disks
having same event count, regardless of their recovery_start.
Be consistent and don't accept disks with a valid recovery_start at all.

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

index 080993dfc47d7010ca480fb278ad8cb4b1dd9b9f..227d66fc68d9e7a227f6a9099efa4efbdfbfb486 100644 (file)
@@ -1069,6 +1069,7 @@ int Assemble(struct supertype *st, char *mddev,
                        int j = best[i];
                        if (j >= 0 &&
                            !devices[j].uptodate &&
+                           devices[j].i.recovery_start == MaxSector &&
                            devices[j].i.events == current_events) {
                                chosen_drive = j;
                                goto add_another;