From 3d59f0c039281d0b393d11f6eb8b4ce6bcdbc236 Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Wed, 7 Dec 2011 13:58:30 +0100 Subject: [PATCH] imsm: FIX: Finish rebuild and initialization when missing drive is handled When missing device is handled for rebuild or initialization end_migration() should be called to merge ords in case additional degradation. I've removed this call to end_migration() as it was called for migration also. Signed-off-by: Adam Kwolek Signed-off-by: NeilBrown --- super-intel.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/super-intel.c b/super-intel.c index de07f660..9689fdd4 100644 --- a/super-intel.c +++ b/super-intel.c @@ -6192,6 +6192,17 @@ static void handle_missing(struct intel_super *super, struct imsm_dev *dev) return; dprintf("imsm: mark missing\n"); + /* end process for initialization and rebuild only + */ + if (is_gen_migration(dev) == 0) { + __u8 map_state; + int failed; + + failed = imsm_count_failed(super, dev, MAP_0); + map_state = imsm_check_degraded(super, dev, failed, MAP_0); + + end_migration(dev, super, map_state); + } for (dl = super->missing; dl; dl = dl->next) mark_missing(dev, &dl->disk, dl->index); super->updates_pending++; -- 2.47.2