Grow: only check 'native format' when really needed.
The check that the array info is already in 'native format' is only relevant when restarting a growth, so only perform it then. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
eae35f5c55
commit
817ed7d6d6
7
Grow.c
7
Grow.c
|
@ -1651,9 +1651,10 @@ static int reshape_array(char *container, int fd, char *devname,
|
|||
fprintf(stderr, Name ": %s\n", msg);
|
||||
goto release;
|
||||
}
|
||||
if (reshape.level != info->array.level ||
|
||||
reshape.before.layout != info->array.layout ||
|
||||
reshape.before.data_disks + reshape.parity != info->array.raid_disks) {
|
||||
if (restart &&
|
||||
(reshape.level != info->array.level ||
|
||||
reshape.before.layout != info->array.layout ||
|
||||
reshape.before.data_disks + reshape.parity != info->array.raid_disks)) {
|
||||
fprintf(stderr, Name ": reshape info is not in native format -"
|
||||
" cannot continue.\n");
|
||||
goto release;
|
||||
|
|
Loading…
Reference in New Issue