From d7d205bd25d4b5f18907fee12cbc38b934dfc033 Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Wed, 26 Jan 2011 16:03:33 +0100 Subject: [PATCH] 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 --- super-intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.39.2