diff options
author | NeilBrown <neilb@suse.de> | 2010-05-18 12:31:29 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-05-18 12:31:29 +1000 |
commit | 4460f8f7c344a0e8c8d454edcaf392e85912c76e (patch) | |
tree | 45e1570b002a4f8408b4b230d434e9c346fdb959 | |
parent | c03ef02d92e4b2a7397f7247ea5a25d932a1a889 (diff) | |
download | mdadm-4460f8f7c344a0e8c8d454edcaf392e85912c76e.tar.gz mdadm-4460f8f7c344a0e8c8d454edcaf392e85912c76e.tar.xz mdadm-4460f8f7c344a0e8c8d454edcaf392e85912c76e.zip |
Monitor: don't report the disappearance of a faulty device as SpareActive.
Normally Monitor doesn't see faulty devices in active slots - they get
moved away too quickly.
But if it does, it reports the "faulty device disappeared" event (when
it finally does get moved away) as SpareActive due to insufficient
checking.
So add a better check.
Reported-by: Pierre Vignéras <pierre@vigneras.name>
-rw-r--r-- | Monitor.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -391,6 +391,7 @@ int Monitor(mddev_dev_t devlist, ) alert("FailSpare", dev, dv, mailaddr, mailfrom, alert_cmd, dosyslog); else if (i < (unsigned)array.raid_disks && + ! (newstate & (1<<MD_DISK_REMOVED)) && (((st->devstate[i]&change)&(1<<MD_DISK_FAULTY)) || ((newstate&change)&(1<<MD_DISK_ACTIVE)) || ((newstate&change)&(1<<MD_DISK_SYNC))) |