]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - monitor.c
mdmon: ping will wait for manage_mon to catch up.
[thirdparty/mdadm.git] / monitor.c
index 314889657aaae88629241ab4ae69d80b4832284a..e29d023a4c756c9ad1599b5c283988ad1c479f00 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -405,6 +405,8 @@ static void dprint_wake_reasons(fd_set *fds)
 }
 #endif
 
 }
 #endif
 
+int monitor_loop_cnt;
+
 static int wait_and_act(struct supertype *container, int nowait)
 {
        fd_set rfds;
 static int wait_and_act(struct supertype *container, int nowait)
 {
        fd_set rfds;
@@ -462,7 +464,9 @@ static int wait_and_act(struct supertype *container, int nowait)
                sigset_t set;
                sigprocmask(SIG_UNBLOCK, NULL, &set);
                sigdelset(&set, SIGUSR1);
                sigset_t set;
                sigprocmask(SIG_UNBLOCK, NULL, &set);
                sigdelset(&set, SIGUSR1);
+               monitor_loop_cnt |= 1;
                rv = pselect(maxfd+1, &rfds, NULL, NULL, NULL, &set);
                rv = pselect(maxfd+1, &rfds, NULL, NULL, NULL, &set);
+               monitor_loop_cnt += 1;
                if (rv == -1 && errno == EINTR)
                        rv = 0;
                #ifdef DEBUG
                if (rv == -1 && errno == EINTR)
                        rv = 0;
                #ifdef DEBUG