Blame SOURCES/0066-imsm-Correct-minimal-device-size.patch

8e8941
From 06a6101c0a4d2658798dc42f461ace8e6900f840 Mon Sep 17 00:00:00 2001
8e8941
From: Blazej Kucman <blazej.kucman@intel.com>
8e8941
Date: Wed, 11 Mar 2020 15:40:13 +0100
8e8941
Subject: [RHEL7.9 PATCH 66/77] imsm: Correct minimal device size.
8e8941
8e8941
Check if given size of member drive is not less than 1 MibiByte.
8e8941
8e8941
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
8e8941
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
8e8941
---
8e8941
 super-intel.c | 5 ++++-
8e8941
 1 file changed, 4 insertions(+), 1 deletion(-)
8e8941
8e8941
diff --git a/super-intel.c b/super-intel.c
8e8941
index c9a1af5..6680df2 100644
8e8941
--- a/super-intel.c
8e8941
+++ b/super-intel.c
8e8941
@@ -7425,7 +7425,10 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
8e8941
 							verbose);
8e8941
 	}
8e8941
 
8e8941
-	if (size && (size < 1024)) {
8e8941
+	/*
8e8941
+	 * Size is given in sectors.
8e8941
+	 */
8e8941
+	if (size && (size < 2048)) {
8e8941
 		pr_err("Given size must be greater than 1M.\n");
8e8941
 		/* Depends on algorithm in Create.c :
8e8941
 		 * if container was given (dev == NULL) return -1,
8e8941
-- 
8e8941
2.7.5
8e8941