]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
monitor: mark clean on active-idle
authorDan Williams <dan.j.williams@intel.com>
Tue, 16 Sep 2008 03:58:42 +0000 (20:58 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 16 Sep 2008 03:58:42 +0000 (20:58 -0700)
This also handles the case where 'clean' is set directly.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
monitor.c

index 45b5d5b5551bfa91e0ef80359ea088b471567aaf..ecf052855a6b34e9cd89f8b9ba87f56543678a48 100644 (file)
--- 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) {