Grow: goto release if Manage_subdevs failed
If failure happened when add disk to array by grow mode, need to goto release instead of continue the reshape. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
parent
a58e0da443
commit
31dbeda730
8
Grow.c
8
Grow.c
|
@ -3009,9 +3009,11 @@ static int reshape_array(char *container, int fd, char *devname,
|
||||||
* array. Now that the array has been changed to the right
|
* array. Now that the array has been changed to the right
|
||||||
* level and frozen, we can safely add them.
|
* level and frozen, we can safely add them.
|
||||||
*/
|
*/
|
||||||
if (devlist)
|
if (devlist) {
|
||||||
Manage_subdevs(devname, fd, devlist, verbose,
|
if (Manage_subdevs(devname, fd, devlist, verbose,
|
||||||
0,NULL, 0);
|
0, NULL, 0))
|
||||||
|
goto release;
|
||||||
|
}
|
||||||
|
|
||||||
if (reshape.backup_blocks == 0 && data_offset != INVALID_SECTORS)
|
if (reshape.backup_blocks == 0 && data_offset != INVALID_SECTORS)
|
||||||
reshape.backup_blocks = reshape.before.data_disks * info->array.chunk_size/512;
|
reshape.backup_blocks = reshape.before.data_disks * info->array.chunk_size/512;
|
||||||
|
|
Loading…
Reference in New Issue