monitor.c (mdadm-4.1) | : | monitor.c (mdadm-4.2) | ||
---|---|---|---|---|
skipping to change at line 29 | skipping to change at line 29 | |||
*/ | */ | |||
#include "mdadm.h" | #include "mdadm.h" | |||
#include "mdmon.h" | #include "mdmon.h" | |||
#include <sys/syscall.h> | #include <sys/syscall.h> | |||
#include <sys/select.h> | #include <sys/select.h> | |||
#include <signal.h> | #include <signal.h> | |||
static char *array_states[] = { | static char *array_states[] = { | |||
"clear", "inactive", "suspended", "readonly", "read-auto", | "clear", "inactive", "suspended", "readonly", "read-auto", | |||
"clean", "active", "write-pending", "active-idle", NULL }; | "clean", "active", "write-pending", "active-idle", "broken", NULL }; | |||
static char *sync_actions[] = { | static char *sync_actions[] = { | |||
"idle", "reshape", "resync", "recover", "check", "repair", NULL | "idle", "reshape", "resync", "recover", "check", "repair", NULL | |||
}; | }; | |||
enum bb_action { | enum bb_action { | |||
RECORD_BB = 1, | RECORD_BB = 1, | |||
COMPARE_BB, | COMPARE_BB, | |||
}; | }; | |||
static int write_attr(char *attr, int fd) | static int write_attr(char *attr, int fd) | |||
skipping to change at line 479 | skipping to change at line 479 | |||
a->next_state = active; | a->next_state = active; | |||
ret |= ARRAY_DIRTY; | ret |= ARRAY_DIRTY; | |||
} | } | |||
if (a->curr_state == active_idle) { | if (a->curr_state == active_idle) { | |||
/* Set array to 'clean' FIRST, then mark clean | /* Set array to 'clean' FIRST, then mark clean | |||
* in the metadata | * in the metadata | |||
*/ | */ | |||
a->next_state = clean; | a->next_state = clean; | |||
ret |= ARRAY_DIRTY; | ret |= ARRAY_DIRTY; | |||
} | } | |||
if (a->curr_state == clean) { | if ((a->curr_state == clean) || (a->curr_state == broken)) { | |||
a->container->ss->set_array_state(a, 1); | a->container->ss->set_array_state(a, 1); | |||
} | } | |||
if (a->curr_state == active || | if (a->curr_state == active || | |||
a->curr_state == suspended) | a->curr_state == suspended) | |||
ret |= ARRAY_DIRTY; | ret |= ARRAY_DIRTY; | |||
if (a->curr_state == readonly) { | if (a->curr_state == readonly) { | |||
/* Well, I'm ready to handle things. If readonly | /* Well, I'm ready to handle things. If readonly | |||
* wasn't requested, transition to read-auto. | * wasn't requested, transition to read-auto. | |||
*/ | */ | |||
char buf[64]; | char buf[64]; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |