}
-static int get_resync_start(struct active_array *a)
+int get_resync_start(struct active_array *a)
{
char buf[30];
int n;
}
}
- if (a->curr_action == idle &&
+ if (!deactivate &&
+ a->curr_action == idle &&
a->prev_action == resync) {
/* A resync has finished. The endpoint is recorded in
* 'sync_start'. We don't update the metadata
check_degraded = 1;
}
- if (a->curr_action == idle &&
+ if (!deactivate &&
+ a->curr_action == idle &&
a->prev_action == recover) {
/* A recovery has finished. Some disks may be in sync now,
* and the array may no longer be degraded
}
#endif
+int monitor_loop_cnt;
+
static int wait_and_act(struct supertype *container, int nowait)
{
fd_set rfds;
sigset_t set;
sigprocmask(SIG_UNBLOCK, NULL, &set);
sigdelset(&set, SIGUSR1);
+ monitor_loop_cnt |= 1;
rv = pselect(maxfd+1, &rfds, NULL, NULL, NULL, &set);
+ monitor_loop_cnt += 1;
if (rv == -1 && errno == EINTR)
rv = 0;
#ifdef DEBUG