From: Adam Kwolek Date: Thu, 9 Jun 2011 03:00:55 +0000 (+1000) Subject: imsm: FIX: Do not continue reshape when backup exists X-Git-Tag: mdadm-3.2.2~27 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2c59438169217eb1077f6cfddf2147a9c978588;p=thirdparty%2Fmdadm.git imsm: FIX: Do not continue reshape when backup exists When backup exists in copy area reshape cannot be continued. In such situation, array is in unstable state. Signed-off-by: Adam Kwolek Signed-off-by: NeilBrown --- diff --git a/super-intel.c b/super-intel.c index ff029d4f..06831c3e 100644 --- a/super-intel.c +++ b/super-intel.c @@ -8744,6 +8744,13 @@ static int imsm_manage_reshape( /* initialize migration record for start condition */ if (sra->reshape_progress == 0) init_migr_record_imsm(st, dev, sra); + else { + if (__le32_to_cpu(migr_rec->rec_status) != UNIT_SRC_NORMAL) { + dprintf("imsm: cannot restart migration when data " + "are present in copy area.\n"); + goto abort; + } + } /* size for data */ buf_size = __le32_to_cpu(migr_rec->blocks_per_unit) * 512;