diff options
author | NeilBrown <neilb@suse.de> | 2011-03-22 04:47:55 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-22 04:47:55 +0100 |
commit | 38376c2e51fdc31b7e53d285729fb80b756d8d37 (patch) | |
tree | 664394c83196a477532afcfe0f76863ae4900809 /Monitor.c | |
parent | ddf: fix up detection of failed/missing devices. (diff) | |
download | mdadm-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |