]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/raid1.c
md: don't retry recovery of raid1 that fails due to error on source drive.
[linux-2.6-omap-h63xx.git] / drivers / md / raid1.c
index c165b1eed8bb37745d3d1284dc855eeb3b771c7a..7b4f5f7155d8726705c1f42757f68dd1de869624 100644 (file)
@@ -1016,12 +1016,16 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
         * else mark the drive as failed
         */
        if (test_bit(In_sync, &rdev->flags)
-           && (conf->raid_disks - mddev->degraded) == 1)
+           && (conf->raid_disks - mddev->degraded) == 1) {
                /*
                 * Don't fail the drive, act as though we were just a
-                * normal single drive
+                * normal single drive.
+                * However don't try a recovery from this drive as
+                * it is very likely to fail.
                 */
+               mddev->recovery_disabled = 1;
                return;
+       }
        if (test_and_clear_bit(In_sync, &rdev->flags)) {
                unsigned long flags;
                spin_lock_irqsave(&conf->device_lock, flags);