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;
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;
int first = 0;
int last = conf->raid_disks - 1;
+ if (rdev->badblocks.count)
+ return -EINVAL;
+
if (mddev->recovery_cp < MaxSector)
/* only hot-add to in-sync arrays, as recovery is
* very different from resync
(conf->raid_disks / conf->near_copies));
list_for_each_entry(rdev, &mddev->disks, same_set) {
+
+ if (rdev->badblocks.count) {
+ printk(KERN_ERR "md/raid10: cannot handle bad blocks yet\n");
+ goto out_free_conf;
+ }
disk_idx = rdev->raid_disk;
if (disk_idx >= conf->raid_disks
|| disk_idx < 0)
* 0 for a fully functional array, 1 or 2 for a degraded array.
*/
list_for_each_entry(rdev, &mddev->disks, same_set) {
+ if (rdev->badblocks.count) {
+ printk(KERN_ERR "md/raid5: cannot handle bad blocks yet\n");
+ goto abort;
+ }
if (rdev->raid_disk < 0)
continue;
if (test_bit(In_sync, &rdev->flags)) {
int first = 0;
int last = conf->raid_disks - 1;
+ if (rdev->badblocks.count)
+ return -EINVAL;
+
if (has_failed(conf))
/* no point adding a device */
return -EINVAL;