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>
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) {