summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2005-09-09 16:24:04 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:39:15 -0700
commit87fc767b832ef5a681a0ff9d203c3289bc3be2bf (patch)
tree141e59c5ab978675339b34e6ddb8fe0b39156853 /drivers/md/raid10.c
parent6d508242b231cb6e6803faaef54456abe846edb8 (diff)
downloadop-kernel-dev-87fc767b832ef5a681a0ff9d203c3289bc3be2bf.zip
op-kernel-dev-87fc767b832ef5a681a0ff9d203c3289bc3be2bf.tar.gz
[PATCH] md: fix BUG when raid10 rebuilds without enough drives
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>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 834bf0f..5bd1e9e 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -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) {
OpenPOWER on IntegriCloud