[PATCH] 2.4.25 raid1 : correct nr of spares after I/O errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the spare failed during a resync, the number of spares should be
decremented.

Regards,
Mike T.


--- a/drivers/md/raid1.c        2004-03-17 14:26:51.000000000 -0600
+++ b/drivers/md/raid1.c        2004-03-17 14:28:11.000000000 -0600
@@ -762,6 +762,10 @@
                sb->active_disks--;
        sb->working_disks--;
        sb->failed_disks++;
+       if (mirror->spare) {
+               sb->spare_disks--;
+               mirror->spare = 0;
+       }
        mddev->sb_dirty = 1;
        md_wakeup_thread(conf->thread);
        if (!mirror->write_only)


-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux