Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://neil.brown.name/md
Browse files Browse the repository at this point in the history
* '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
  • Loading branch information
Linus Torvalds committed May 7, 2010
2 parents 2c32b1d + 1176568 commit f1c448e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -2109,12 +2109,18 @@ static void md_update_sb(mddev_t * mddev, int force_change)
if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */
/* .. if the array isn't clean, an 'even' event must also go
* to spares. */
if ((mddev->events&1)==0)
if ((mddev->events&1)==0) {
nospares = 0;
sync_req = 2; /* force a second update to get the
* even/odd in sync */
}
} else {
/* otherwise an 'odd' event must go to spares */
if ((mddev->events&1))
if ((mddev->events&1)) {
nospares = 0;
sync_req = 2; /* force a second update to get the
* even/odd in sync */
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ static void raid5_end_read_request(struct bio * bi, int error)

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

0 comments on commit f1c448e

Please sign in to comment.