summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-04-06 12:40:04 +1000
committerNeilBrown <neilb@suse.de>2011-04-06 12:40:04 +1000
commit2a4a08e7d3a3a76094352a3c477d7901ac993554 (patch)
treec2788de47b36d6239da2355072b82735c7e16686
parent6dc0be309d22db35f65edd283f72e2600b8d83c8 (diff)
imsm: FIX: Check array alignment before expansion
It can occur that OROM creates array not aligned properly. Expansion cannot be run in such cases. It is detected in analyse_change(). It is too late. This causes that metadata is in migration state already, when expansion cannot be started. This problem has to be detected before metadata is updated, in all arrays in reshaped container. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super-intel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c
index 010226db..362e4330 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -6946,6 +6946,14 @@ static int imsm_reshape_is_allowed_on_container(struct supertype *st,
geo->raid_disks > 1 ? "s" : "");
break;
}
+ /* check if component size is aligned to chunk size
+ */
+ if (info->component_size %
+ (info->array.chunk_size/512)) {
+ dprintf("Component size is not aligned to "
+ "chunk size\n");
+ break;
+ }
}
if (*old_raid_disks &&