diff options
author | Martin Wilck <mwilck@arcor.de> | 2013-07-30 23:18:30 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-07-31 04:57:20 +0200 |
commit | 39da26ecf51137f9b7c6574cc725b061025c523f (patch) | |
tree | 48280d71b65c51027005555b498bc8ea5341b982 /monitor.c | |
parent | DDF: ddf_set_disk: add some debug messages (diff) | |
download | mdadm-39da26ecf51137f9b7c6574cc725b061025c523f.tar.xz mdadm-39da26ecf51137f9b7c6574cc725b061025c523f.zip |
monitor: read_and_act: log status when called
read_and_act() currently prints a debug message only very late.
Print the status seen by mdmon right away, to track mdmon's
actions more closely. Add a time stamp to observe long delays
between read_and_act calls, e.g. caused by meta data writes.
Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -234,6 +234,7 @@ static int read_and_act(struct active_array *a) struct mdinfo *mdi; int ret = 0; int count = 0; + struct timeval tv; a->next_state = bad_word; a->next_action = bad_action; @@ -258,6 +259,17 @@ static int read_and_act(struct active_array *a) } } + gettimeofday(&tv, NULL); + dprintf("%s(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n", + __func__, a->info.container_member, + tv.tv_sec, tv.tv_usec, + array_states[a->curr_state], + array_states[a->prev_state], + sync_actions[a->curr_action], + sync_actions[a->prev_action], + a->info.resync_start + ); + if (a->curr_state > inactive && a->prev_state == inactive) { /* array has been started |