[PATCH 3/7] imsm: FIX: do not allow for container operation for the same disks number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <adam.kwolek@xxxxxxxxx>
---

 super-intel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 4e96196..5a8886d 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -6747,7 +6747,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
 			 */

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux