From: Adam Kwolek Date: Wed, 26 Jan 2011 15:03:33 +0000 (+0100) Subject: imsm: FIX: do not allow for container operation for the same disks number X-Git-Tag: mdadm-3.2~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7d205bd25d4b5f18907fee12cbc38b934dfc033;p=thirdparty%2Fmdadm.git imsm: FIX: do not allow for container operation for the same disks number imsm_reshape_super() currently allows for expansion when requested raid_disks number is the same as current. This is wrong. Existing in code condition is too weak. We should allow for expansion when new disks_number is greater than current only. Signed-off-by: Adam Kwolek Signed-off-by: NeilBrown --- diff --git a/super-intel.c b/super-intel.c index 8e999a5f..cc471991 100644 --- a/super-intel.c +++ b/super-intel.c @@ -6700,7 +6700,7 @@ static int imsm_reshape_is_allowed_on_container(struct supertype *st, dprintf("imsm: checking device_num: %i\n", member->container_member); - if (geo->raid_disks < member->array.raid_disks) { + if (geo->raid_disks <= member->array.raid_disks) { /* we work on container for Online Capacity Expansion * only so raid_disks has to grow */