|
@@ -8130,6 +8130,15 @@ void md_check_recovery(struct mddev *mddev)
|
|
|
int spares = 0;
|
|
|
|
|
|
if (mddev->ro) {
|
|
|
+ struct md_rdev *rdev;
|
|
|
+ if (!mddev->external && mddev->in_sync)
|
|
|
+ /* 'Blocked' flag not needed as failed devices
|
|
|
+ * will be recorded if array switched to read/write.
|
|
|
+ * Leaving it set will prevent the device
|
|
|
+ * from being removed.
|
|
|
+ */
|
|
|
+ rdev_for_each(rdev, mddev)
|
|
|
+ clear_bit(Blocked, &rdev->flags);
|
|
|
/* On a read-only array we can:
|
|
|
* - remove failed devices
|
|
|
* - add already-in_sync devices if the array itself
|