From: Adam Kwolek Date: Tue, 6 Dec 2011 00:24:22 +0000 (+1100) Subject: imsm: FIX: Do not end migration when missing drive is handled X-Git-Tag: mdadm-3.2.3~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd5f6849b0290d676eff9b6f5b3d890d7184641b;p=thirdparty%2Fmdadm.git imsm: FIX: Do not end migration when missing drive is handled Currently when degradation occurs migration is finalized. This is wrong. Finalizing migration when it is not finished can lead to data corruption after next array assembly. Do not finish migration when degradation occurs. Signed-off-by: Adam Kwolek Signed-off-by: NeilBrown --- diff --git a/super-intel.c b/super-intel.c index 0b2da922..5ad810c6 100644 --- a/super-intel.c +++ b/super-intel.c @@ -6112,17 +6112,12 @@ static void mark_missing(struct imsm_dev *dev, struct imsm_disk *disk, int idx) static void handle_missing(struct intel_super *super, struct imsm_dev *dev) { - __u8 map_state; struct dl *dl; - int failed; if (!super->missing) return; - failed = imsm_count_failed(super, dev); - map_state = imsm_check_degraded(super, dev, failed); dprintf("imsm: mark missing\n"); - end_migration(dev, map_state); for (dl = super->missing; dl; dl = dl->next) mark_missing(dev, &dl->disk, dl->index); super->updates_pending++;