imsm: Correct minimal device size.

Check if given size of member drive is not less than 1 MibiByte.

Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
Blazej Kucman 2020-03-11 15:40:13 +01:00 committed by Jes Sorensen
parent 45c43276d0
commit 06a6101c0a
1 changed files with 4 additions and 1 deletions

View File

@ -7425,7 +7425,10 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
verbose);
}
if (size && (size < 1024)) {
/*
* Size is given in sectors.
*/
if (size && (size < 2048)) {
pr_err("Given size must be greater than 1M.\n");
/* Depends on algorithm in Create.c :
* if container was given (dev == NULL) return -1,