Skip to contentSkip to conversation

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

PATCH New Mike Tran 1 participant 1 message Mar 17, 2004 MD RAID

lore
Share & tools
lore

Mike Tran

author
#0 lore raw

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

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

Regards,
Mike T.

drivers/md/raid1.c 2004-03-17 14:28:11.000000000 -0600 renamed from drivers/md/raid1.c 2004-03-17 14:26:51.000000000 -0600 +4 -0
@@ -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)