]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdmon: close possibility of re-marking the metadata dirty on shutdown
authorDan Williams <dan.j.williams@intel.com>
Mon, 14 Jul 2008 21:59:39 +0000 (14:59 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 14 Jul 2008 21:59:39 +0000 (14:59 -0700)
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
monitor.c

index 955b53f723ffbfb219c951069ab27d352794cd91..d6b1fbe1dda55ae84e7a8a4e36af2f6c1bbdd669 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -251,7 +251,8 @@ static int read_and_act(struct active_array *a)
                }
        }
 
-       if (a->curr_action == idle &&
+       if (!deactivate &&
+           a->curr_action == idle &&
            a->prev_action == resync) {
                /* A resync has finished.  The endpoint is recorded in
                 * 'sync_start'.  We don't update the metadata
@@ -263,7 +264,8 @@ static int read_and_act(struct active_array *a)
                check_degraded = 1;
        }
 
-       if (a->curr_action == idle &&
+       if (!deactivate &&
+           a->curr_action == idle &&
            a->prev_action == recover) {
                /* A recovery has finished.  Some disks may be in sync now,
                 * and the array may no longer be degraded