aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 2f28745dacf9..425958a76b84 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1268,7 +1268,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
1268 /* 1268 /*
1269 * if recovery was running, make sure it aborts. 1269 * if recovery was running, make sure it aborts.
1270 */ 1270 */
1271 set_bit(MD_RECOVERY_ERR, &mddev->recovery); 1271 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
1272 } 1272 }
1273 set_bit(Faulty, &rdev->flags); 1273 set_bit(Faulty, &rdev->flags);
1274 printk (KERN_ALERT 1274 printk (KERN_ALERT
@@ -4574,6 +4574,14 @@ static int raid5_remove_disk(mddev_t *mddev, int number)
4574 err = -EBUSY; 4574 err = -EBUSY;
4575 goto abort; 4575 goto abort;
4576 } 4576 }
4577 /* Only remove non-faulty devices if recovery
4578 * isn't possible.
4579 */
4580 if (!test_bit(Faulty, &rdev->flags) &&
4581 mddev->degraded <= conf->max_degraded) {
4582 err = -EBUSY;
4583 goto abort;
4584 }
4577 p->rdev = NULL; 4585 p->rdev = NULL;
4578 synchronize_rcu(); 4586 synchronize_rcu();
4579 if (atomic_read(&rdev->nr_pending)) { 4587 if (atomic_read(&rdev->nr_pending)) {