diff options
author | Krzysztof Wojcik <krzysztof.wojcik@intel.com> | 2011-01-25 07:44:11 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-01-26 01:47:52 +0100 |
commit | 10ce18083dd0847764494eec1d1bf652c453d740 (patch) | |
tree | f261b3d60df34aeb02a66288684d40f44269576a /monitor.c | |
parent | Check number of failed disks durig raid10->raid0 takeover (diff) | |
download | mdadm-10ce18083dd0847764494eec1d1bf652c453d740.tar.xz mdadm-10ce18083dd0847764494eec1d1bf652c453d740.zip |
FIX: Reset disk state if disk is missing
If we can't read actual disk state, it shoud be initiated
to 0.
Overwise it may be out of date value resulting false action
later in code (e.g. set disk to improper state).
Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -229,6 +229,7 @@ static int read_and_act(struct active_array *a) sync_completed = read_sync_completed(a->sync_completed_fd); for (mdi = a->info.devs; mdi ; mdi = mdi->next) { mdi->next_state = 0; + mdi->curr_state = 0; if (mdi->state_fd >= 0) { mdi->recovery_start = read_resync_start(mdi->recovery_fd); mdi->curr_state = read_dev_state(mdi->state_fd); |