diff options
author | Pawel Baldysiak <pawel.baldysiak@intel.com> | 2016-12-22 13:10:47 +0100 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-12-22 18:20:13 +0100 |
commit | 1e9b2c3fb780c033f960736a982997e14fcd6222 (patch) | |
tree | 4e1bba35cb4a5b8e8d9bd3836e37e1068076e0ee | |
parent | Make get_component_size() work with named array. (diff) | |
download | mdadm-1e9b2c3fb780c033f960736a982997e14fcd6222.tar.xz mdadm-1e9b2c3fb780c033f960736a982997e14fcd6222.zip |
IMSM: Do not update metadata if not able to migrate
This patch prevents mdadm from updating metadata if migration is
not possible. The same check is done in analyse_change(),
but in that place - metadata is already modified.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
-rw-r--r-- | super-intel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c index b7a52031..df959572 100644 --- a/super-intel.c +++ b/super-intel.c @@ -10815,6 +10815,11 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st, pr_err("Error. Chunk size change for RAID 10 is not supported.\n"); change = -1; goto analyse_change_exit; + } else if (info.component_size % (geo->chunksize/512)) { + pr_err("New chunk size (%dK) does not evenly divide device size (%lluk). Aborting...\n", + geo->chunksize/1024, info.component_size/2); + change = -1; + goto analyse_change_exit; } change = CH_MIGRATION; } else { |