]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Allow event counters to be off by one
authorNeil Brown <neilb@suse.de>
Mon, 5 Dec 2005 05:56:18 +0000 (05:56 +0000)
committerNeil Brown <neilb@suse.de>
Mon, 5 Dec 2005 05:56:18 +0000 (05:56 +0000)
.. even without --force

Signed-off-by: Neil Brown <neilb@suse.de>
Assemble.c
ChangeLog

index c78a1b16c6067495a2789873b119db259afcb32e..9fbc53e8539ca9135e2e18643cd338d9015a1f27 100644 (file)
@@ -369,7 +369,9 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
        sparecnt=0;
        for (i=0; i< bestcnt ;i++) {
                int j = best[i];
-               int event_margin = !force;
+               int event_margin = 1; /* always allow a difference of '1'
+                                      * like the kernel does
+                                      */
                if (j < 0) continue;
                /* note: we ignore error flags in multipath arrays
                 * as they don't make sense
index 7f03eada9231d46dfea156dd6884b738fd9ec589..a83cb0bb41684dcbbe2d65f35486e112225a045f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,10 @@ Changes Prior to this release
        Thanks to Ross Vandegrift
     -   --monitor now reports which device failed in a 'Fail' message
           This broke with 2.6
+    -   Improve chance of array starting properly after a crash.
+       mdadm was insisting the event numbers were identical, but this
+       isn't needed, and is a problem if the crash was while the metadata
+       was being updated.
 
 Changes Prior to 2.1 release
     -   Fix assembling of raid10 array when devices are missing.