Grow: disallow --size changes on RAID0 and Linear.

These aren't meaningful and must be disabled.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2013-02-21 14:51:11 +11:00
parent 2452f13a41
commit 3920235ea2
1 changed files with 6 additions and 0 deletions

6
Grow.c
View File

@ -1703,6 +1703,12 @@ int Grow_reshape(char *devname, int fd,
if (orig_size == 0)
orig_size = (unsigned) array.size;
if (orig_size == 0) {
pr_err("Cannot set device size in this type of array.\n");
rv = 1;
goto release;
}
if (reshape_super(st, s->size, UnSet, UnSet, 0, 0, UnSet, NULL,
devname, APPLY_METADATA_CHANGES, c->verbose > 0)) {
rv = 1;