summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 3cbf0ac2aaad..8db311d7cddc 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1055,6 +1055,9 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
if (mddev->recovery_disabled == conf->recovery_disabled)
return -EBUSY;
+ if (rdev->badblocks.count)
+ return -EINVAL;
+
if (rdev->raid_disk >= 0)
first = last = rdev->raid_disk;
@@ -1994,6 +1997,10 @@ static int run(mddev_t *mddev)
blk_queue_segment_boundary(mddev->queue,
PAGE_CACHE_SIZE - 1);
}
+ if (rdev->badblocks.count) {
+ printk(KERN_ERR "md/raid1: Cannot handle bad blocks yet\n");
+ return -EINVAL;
+ }
}
mddev->degraded = 0;