Skip to content

Commit f1c448e

Browse files
committed
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: md: restore ability of spare drives to spin down. md/raid6: Fix raid-6 read-error correction in degraded state
2 parents 2c32b1d + 1176568 commit f1c448e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

drivers/md/md.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,12 +2109,18 @@ static void md_update_sb(mddev_t * mddev, int force_change)
21092109
if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */
21102110
/* .. if the array isn't clean, an 'even' event must also go
21112111
* to spares. */
2112-
if ((mddev->events&1)==0)
2112+
if ((mddev->events&1)==0) {
21132113
nospares = 0;
2114+
sync_req = 2; /* force a second update to get the
2115+
* even/odd in sync */
2116+
}
21142117
} else {
21152118
/* otherwise an 'odd' event must go to spares */
2116-
if ((mddev->events&1))
2119+
if ((mddev->events&1)) {
21172120
nospares = 0;
2121+
sync_req = 2; /* force a second update to get the
2122+
* even/odd in sync */
2123+
}
21182124
}
21192125
}
21202126

drivers/md/raid5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ static void raid5_end_read_request(struct bio * bi, int error)
15271527

15281528
clear_bit(R5_UPTODATE, &sh->dev[i].flags);
15291529
atomic_inc(&rdev->read_errors);
1530-
if (conf->mddev->degraded)
1530+
if (conf->mddev->degraded >= conf->max_degraded)
15311531
printk_rl(KERN_WARNING
15321532
"raid5:%s: read error not correctable "
15331533
"(sector %llu on %s).\n",

0 commit comments

Comments
 (0)