summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authormwilck@arcor.de <mwilck@arcor.de>2013-10-25 12:07:38 +0200
committerNeilBrown <neilb@suse.de>2013-04-23 14:55:32 +1000
commit6b374ba36843e3e72bf433069bfd8541102958f3 (patch)
tree6a5f6317ce990c7f52f5a4742eca2b8ac7cb1553 /monitor.c
parent40ae6f5f8ee99328224acc4eaf541aef248b9b7d (diff)
monitor: treat unreadable array_state as clean
Failure to read array_state can only mean the array has been deleted by the kernel; it is not an indication that the array is dirty. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 60c5d5a2..47432b25 100644
--- a/monitor.c
+++ b/monitor.c
@@ -265,7 +265,7 @@ static int read_and_act(struct active_array *a)
*/
a->container->ss->set_array_state(a, 0);
}
- if (a->curr_state <= inactive &&
+ if ((a->curr_state == bad_word || a->curr_state <= inactive) &&
a->prev_state > inactive) {
/* array has been stopped */
a->container->ss->set_array_state(a, 1);
@@ -288,8 +288,7 @@ static int read_and_act(struct active_array *a)
a->container->ss->set_array_state(a, 1);
}
if (a->curr_state == active ||
- a->curr_state == suspended ||
- a->curr_state == bad_word)
+ a->curr_state == suspended)
ret |= ARRAY_DIRTY;
if (a->curr_state == readonly) {
/* Well, I'm ready to handle things. If readonly