Blame SOURCES/0043-imsm-allow-to-specify-second-volume-size.patch

f9a9f5
From 1a1ced1e2e64a6b4b349a3fb559f6b39e4cf7103 Mon Sep 17 00:00:00 2001
f9a9f5
From: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
f9a9f5
Date: Fri, 8 Nov 2019 11:59:11 +0100
f9a9f5
Subject: [RHEL7.8 PATCH V2 43/47] imsm: allow to specify second volume size
f9a9f5
f9a9f5
Removed checks which limited second volume size only to max value (the
f9a9f5
largest size that fits on all current drives). It is now permitted
f9a9f5
to create second volume with size lower then maximum possible.
f9a9f5
f9a9f5
Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
f9a9f5
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
f9a9f5
---
f9a9f5
 super-intel.c | 14 ++++----------
f9a9f5
 1 file changed, 4 insertions(+), 10 deletions(-)
f9a9f5
f9a9f5
diff --git a/super-intel.c b/super-intel.c
f9a9f5
index e02bbd7..713058c 100644
f9a9f5
--- a/super-intel.c
f9a9f5
+++ b/super-intel.c
f9a9f5
@@ -7298,11 +7298,8 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
f9a9f5
 
f9a9f5
 	maxsize = merge_extents(super, i);
f9a9f5
 
f9a9f5
-	if (!check_env("IMSM_NO_PLATFORM") &&
f9a9f5
-	    mpb->num_raid_devs > 0 && size && size != maxsize) {
f9a9f5
-		pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
f9a9f5
-		return 0;
f9a9f5
-	}
f9a9f5
+	if (mpb->num_raid_devs > 0 && size && size != maxsize)
f9a9f5
+		pr_err("attempting to create a second volume with size less then remaining space.\n");
f9a9f5
 
f9a9f5
 	if (maxsize < size || maxsize == 0) {
f9a9f5
 		if (verbose) {
f9a9f5
@@ -7393,11 +7390,8 @@ static int imsm_get_free_size(struct supertype *st, int raiddisks,
f9a9f5
 		}
f9a9f5
 		maxsize = size;
f9a9f5
 	}
f9a9f5
-	if (!check_env("IMSM_NO_PLATFORM") &&
f9a9f5
-	    mpb->num_raid_devs > 0 && size && size != maxsize) {
f9a9f5
-		pr_err("attempting to create a second volume with size less then remaining space. Aborting...\n");
f9a9f5
-		return 0;
f9a9f5
-	}
f9a9f5
+	if (mpb->num_raid_devs > 0 && size && size != maxsize)
f9a9f5
+		pr_err("attempting to create a second volume with size less then remaining space.\n");
f9a9f5
 	cnt = 0;
f9a9f5
 	for (dl = super->disks; dl; dl = dl->next)
f9a9f5
 		if (dl->e)
f9a9f5
-- 
f9a9f5
2.7.5
f9a9f5