From: NeilBrown Date: Tue, 18 May 2010 02:31:29 +0000 (+1000) Subject: Monitor: don't report the disappearance of a faulty device as SpareActive. X-Git-Tag: mdadm-3.1.3~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4460f8f7c344a0e8c8d454edcaf392e85912c76e;p=thirdparty%2Fmdadm.git 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 --- diff --git a/Monitor.c b/Monitor.c index b0802f86..8e82797b 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<devstate[i]&change)&(1<