FIX: Container can be left frozen
When container operation fails before child process starts, array can be left frozen because container_reshape() doesn't make unfreeze() operation in all error cases, as it is responsible for. add unfreeze() operation for error case scenarios in reshape_container() Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
8200f09e8f
commit
9e3254422d
5
Grow.c
5
Grow.c
|
@ -2122,8 +2122,10 @@ int reshape_container(char *container, int cfd, char *devname,
|
|||
if (reshape_super(st, -1, info->new_level,
|
||||
info->new_layout, info->new_chunk,
|
||||
info->array.raid_disks + info->delta_disks,
|
||||
backup_file, devname, quiet))
|
||||
backup_file, devname, quiet)) {
|
||||
unfreeze(st);
|
||||
return 1;
|
||||
}
|
||||
|
||||
sync_metadata(st);
|
||||
|
||||
|
@ -2134,6 +2136,7 @@ int reshape_container(char *container, int cfd, char *devname,
|
|||
switch (fork()) {
|
||||
case -1: /* error */
|
||||
perror("Cannot fork to complete reshape\n");
|
||||
unfreeze(st);
|
||||
return 1;
|
||||
default: /* parent */
|
||||
printf(Name ": multi-array reshape continues in background\n");
|
||||
|
|
Loading…
Reference in New Issue