From b2c59438169217eb1077f6cfddf2147a9c978588 Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Thu, 9 Jun 2011 13:00:55 +1000 Subject: 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 --- super-intel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/super-intel.c b/super-intel.c index ff029d4..06831c3 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; -- cgit v1.2.1