Add error handling for chunk size in RAID1

Print error if chunk size is set as it is not supported.

Signed-off-by: Mateusz Grzonka <mateusz.grzonka@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
Mateusz Grzonka 2021-07-15 12:25:23 +02:00 committed by Jes Sorensen
parent 3a85bf0e41
commit 5b30a34aa4
1 changed files with 2 additions and 3 deletions

View File

@ -254,9 +254,8 @@ int Create(struct supertype *st, char *mddev,
case LEVEL_MULTIPATH: case LEVEL_MULTIPATH:
case LEVEL_CONTAINER: case LEVEL_CONTAINER:
if (s->chunk) { if (s->chunk) {
s->chunk = 0; pr_err("specifying chunk size is forbidden for this level\n");
if (c->verbose > 0) return 1;
pr_err("chunk size ignored for this level\n");
} }
break; break;
default: default: