]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdmon: notify metadata of recovery completion
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)
Array may no longer be degraded.

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

index 46d5e0a00380672285a2667c140e8324cc545721..955b53f723ffbfb219c951069ab27d352794cd91 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -265,12 +265,16 @@ static int read_and_act(struct active_array *a)
 
        if (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
+                */
                for (mdi = a->info.devs ; mdi ; mdi = mdi->next) {
                        a->container->ss->set_disk(a, mdi->disk.raid_disk,
                                                   mdi->curr_state);
                        if (! (mdi->curr_state & DS_INSYNC))
                                check_degraded = 1;
                }
+               a->container->ss->set_array_state(a, 0);
        }
 
        for (mdi = a->info.devs ; mdi ; mdi = mdi->next) {