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

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