aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index b8a0fcfb1de1..fec4abcb9bb4 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2150,12 +2150,18 @@ repeat:
2150 if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ 2150 if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */
2151 /* .. if the array isn't clean, an 'even' event must also go 2151 /* .. if the array isn't clean, an 'even' event must also go
2152 * to spares. */ 2152 * to spares. */
2153 if ((mddev->events&1)==0) 2153 if ((mddev->events&1)==0) {
2154 nospares = 0; 2154 nospares = 0;
2155 sync_req = 2; /* force a second update to get the
2156 * even/odd in sync */
2157 }
2155 } else { 2158 } else {
2156 /* otherwise an 'odd' event must go to spares */ 2159 /* otherwise an 'odd' event must go to spares */
2157 if ((mddev->events&1)) 2160 if ((mddev->events&1)) {
2158 nospares = 0; 2161 nospares = 0;
2162 sync_req = 2; /* force a second update to get the
2163 * even/odd in sync */
2164 }
2159 } 2165 }
2160 } 2166 }
2161 2167