Grow: don't allow array geometry change with ppl enabled

Don't allow array geometry change (size expand, disk adding) when PPL
consistency policy is enabled. Current PPL implementation doesn't work when
reshape is taking place.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
Tomasz Majchrzak 2017-06-08 16:05:51 +02:00 committed by Jes Sorensen
parent b13b52c80f
commit b208f817ec
1 changed files with 7 additions and 0 deletions

7
Grow.c
View File

@ -1880,6 +1880,13 @@ int Grow_reshape(char *devname, int fd,
free(subarray);
return 1;
}
if (content->consistency_policy ==
CONSISTENCY_POLICY_PPL) {
pr_err("Operation not supported when ppl consistency policy is enabled\n");
sysfs_free(cc);
free(subarray);
return 1;
}
}
sysfs_free(cc);
}