Grow: don't hold array open while waiting for reshape.
If we will need to change array level when a reshape completes, a copy of mdadm waits in the background. Currently this copy hold the device (/dev/mdX) open. This prevents the array from being stopped. So close the file descriptor and re-open after the reshape completes. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
419e018284
commit
3377ee4248
6
Grow.c
6
Grow.c
|
@ -3086,9 +3086,11 @@ static int reshape_array(char *container, int fd, char *devname,
|
|||
map_fork();
|
||||
break;
|
||||
}
|
||||
close(fd);
|
||||
wait_reshape(sra);
|
||||
impose_level(fd, info->new_level, devname, verbose);
|
||||
|
||||
fd = open_dev(sra->sys_name);
|
||||
if (fd >= 0)
|
||||
impose_level(fd, info->new_level, devname, verbose);
|
||||
return 0;
|
||||
case 1: /* Couldn't set data_offset, try the old way */
|
||||
if (data_offset != INVALID_SECTORS) {
|
||||
|
|
Loading…
Reference in New Issue