diff options
author | Adam Kwolek <adam.kwolek@intel.com> | 2011-06-09 13:00:55 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-06-09 13:00:55 +1000 |
commit | b2c59438169217eb1077f6cfddf2147a9c978588 (patch) | |
tree | ba0ea25052bd5293896ce019c41c7349ccf45c9c | |
parent | ccced3dc40a25c1bbfb6b998b273d02a9add0795 (diff) | |
download | mdadm-b2c59438169217eb1077f6cfddf2147a9c978588.tar.gz |
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 <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | super-intel.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; |