summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-22 04:47:55 +0100
committerNeilBrown <neilb@suse.de>2011-03-22 04:47:55 +0100
commit38376c2e51fdc31b7e53d285729fb80b756d8d37 (patch)
tree664394c83196a477532afcfe0f76863ae4900809 /Monitor.c
parentddf: fix up detection of failed/missing devices. (diff)
downloadmdadm-38376c2e51fdc31b7e53d285729fb80b756d8d37.tar.xz
mdadm-38376c2e51fdc31b7e53d285729fb80b756d8d37.zip
Monitor: handle v.quick removal of devices better.
If a device fails and then is removed before Monitor sees the failure, GET_DISK_INFO returns nothing so Monitor relies on mdstat info where '_' is incorrectly interpreted as 'a spare'. We should treat '_' as 'removed' - that is safer. Without this, a v.quick fail+remove gets reported as 'Failed' then 'SpareActive'. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to '')
-rw-r--r--Monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Monitor.c b/Monitor.c
index 3f211b5b..c1795663 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -607,7 +607,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
} else if (mse && mse->pattern && i < (int)strlen(mse->pattern)) {
switch(mse->pattern[i]) {
case 'U': newstate = 6 /* ACTIVE/SYNC */; break;
- case '_': newstate = 0; break;
+ case '_': newstate = 8 /* REMOVED */; break;
}
disc.major = disc.minor = 0;
}