FIX: Get array information in reshape_array()
Uninitialized array structure is used. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
b335e59305
commit
9ff87c16ce
4
Grow.c
4
Grow.c
|
@ -1632,6 +1632,10 @@ static int reshape_array(char *container, int fd, char *devname,
|
|||
fprintf(stderr, Name ": %s\n", msg);
|
||||
return 1;
|
||||
}
|
||||
if (ioctl(fd, GET_ARRAY_INFO, &array) != 0) {
|
||||
dprintf("Canot get array information.\n");
|
||||
return 1;
|
||||
}
|
||||
spares_needed = max(reshape.before.data_disks,
|
||||
reshape.after.data_disks)
|
||||
+ reshape.parity - array.raid_disks;
|
||||
|
|
Loading…
Reference in New Issue