aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 5fcce7371ee9..202deb43b822 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8130,6 +8130,15 @@ void md_check_recovery(struct mddev *mddev)
8130 int spares = 0; 8130 int spares = 0;
8131 8131
8132 if (mddev->ro) { 8132 if (mddev->ro) {
8133 struct md_rdev *rdev;
8134 if (!mddev->external && mddev->in_sync)
8135 /* 'Blocked' flag not needed as failed devices
8136 * will be recorded if array switched to read/write.
8137 * Leaving it set will prevent the device
8138 * from being removed.
8139 */
8140 rdev_for_each(rdev, mddev)
8141 clear_bit(Blocked, &rdev->flags);
8133 /* On a read-only array we can: 8142 /* On a read-only array we can:
8134 * - remove failed devices 8143 * - remove failed devices
8135 * - add already-in_sync devices if the array itself 8144 * - add already-in_sync devices if the array itself