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 <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-12-07 13:58:30 +01:00 committed by NeilBrown
parent 1778899453
commit 3d59f0c039
1 changed files with 11 additions and 0 deletions

View File

@ -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++;