Re: Spare disk could not sleep / standby [probably dangerous PATCH]

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

 



This patch removes my problem. I hope it doesn't have influence on the stability of
the system.
It is simple: The Update routine skips normaly only "faulty" disks. Now it skips all disk
that are not part of the working array ( raid_disk == -1 )
I made some testing, but surely not all, so :


DON'T APPLY TO YOUR SYSTEM WITH IMPORTENT DATA !

Regards
Peter


--- md.c.orig 2005-01-14 16:33:49.000000000 +0100
+++ md.c 2005-03-09 15:27:23.000000000 +0100
@@ -1340,14 +1340,14 @@
ITERATE_RDEV(mddev,rdev,tmp) {
char b[BDEVNAME_SIZE];
dprintk(KERN_INFO "md: ");
- if (rdev->faulty)
- dprintk("(skipping faulty ");
+ if (rdev->faulty || rdev->raid_disk < 0)
+ dprintk("(skipping faulty/spare ");


dprintk("%s ", bdevname(rdev->bdev,b));
- if (!rdev->faulty) {
+ if (!rdev->faulty && !rdev->raid_disk <0 ) {
err += write_disk_sb(rdev);
} else
- dprintk(")\n");
+ dprintk("<%d>)\n",rdev->raid_disk);
if (!err && mddev->level == LEVEL_MULTIPATH)
/* only need to write one superblock... */
break;



- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx 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