NeilBrown: Monitor: don' t report the disappearance of a faulty device as SpareActive.

Martin F. Krafft madduck at alioth.debian.org
Sat Aug 28 18:44:07 UTC 2010


Module: mdadm
Branch: build
Commit: 4460f8f7c344a0e8c8d454edcaf392e85912c76e
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=4460f8f7c344a0e8c8d454edcaf392e85912c76e

Author: NeilBrown <neilb at suse.de>
Date:   Tue May 18 12:31:29 2010 +1000

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 at vigneras.name>

---

 Monitor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Monitor.c b/Monitor.c
index b0802f8..8e82797 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -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)))




More information about the pkg-mdadm-commits mailing list