From 0a6bdbee8d9be67f1d72d26d9a43cdc2834d8c54 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 14 Jul 2008 14:59:39 -0700 Subject: mdmon: notify metadata of recovery completion Array may no longer be degraded. Signed-off-by: Dan Williams --- monitor.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 46d5e0a..955b53f 100644 --- 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) { -- cgit