Skip to content

Commit

Permalink
[PATCH] md: fix BUG when raid10 rebuilds without enough drives
Browse files Browse the repository at this point in the history
This shouldn't be a BUG.  We should cope.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Sep 9, 2005
1 parent 6d50824 commit 87fc767
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,13 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
}
}
if (j == conf->copies) {
BUG();
/* Cannot recover, so abort the recovery */
put_buf(r10_bio);
r10_bio = rb2;
if (!test_and_set_bit(MD_RECOVERY_ERR, &mddev->recovery))
printk(KERN_INFO "raid10: %s: insufficient working devices for recovery.\n",
mdname(mddev));
break;
}
}
if (biolist == NULL) {
Expand Down

0 comments on commit 87fc767

Please sign in to comment.