|
@@ -2150,12 +2150,18 @@ repeat:
|
|
if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */
|
|
if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */
|
|
/* .. if the array isn't clean, an 'even' event must also go
|
|
/* .. if the array isn't clean, an 'even' event must also go
|
|
* to spares. */
|
|
* to spares. */
|
|
- if ((mddev->events&1)==0)
|
|
|
|
|
|
+ if ((mddev->events&1)==0) {
|
|
nospares = 0;
|
|
nospares = 0;
|
|
|
|
+ sync_req = 2; /* force a second update to get the
|
|
|
|
+ * even/odd in sync */
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
/* otherwise an 'odd' event must go to spares */
|
|
/* otherwise an 'odd' event must go to spares */
|
|
- if ((mddev->events&1))
|
|
|
|
|
|
+ if ((mddev->events&1)) {
|
|
nospares = 0;
|
|
nospares = 0;
|
|
|
|
+ sync_req = 2; /* force a second update to get the
|
|
|
|
+ * even/odd in sync */
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|