From: Dan Williams Date: Tue, 16 Sep 2008 03:58:42 +0000 (-0700) Subject: monitor: mark clean on active-idle X-Git-Tag: mdadm-3.0-devel1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d797a0621f08c799ca7c21a2b3b8eedaf19fc7aa;p=thirdparty%2Fmdadm.git monitor: mark clean on active-idle This also handles the case where 'clean' is set directly. Signed-off-by: Dan Williams --- diff --git a/monitor.c b/monitor.c index 45b5d5b5..ecf05285 100644 --- a/monitor.c +++ b/monitor.c @@ -231,10 +231,14 @@ static int read_and_act(struct active_array *a) a->next_state = active; } if (a->curr_state == active_idle) { - /* Set array to 'clean' FIRST, then - * a->ss->mark_clean(a, ~0ULL); - * just ignore for now. + /* Set array to 'clean' FIRST, then mark clean + * in the metadata */ + a->next_state = clean; + } + if (a->curr_state == clean) { + get_resync_start(a); + a->container->ss->set_array_state(a, 1); } if (a->curr_state == readonly) {