dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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