FIX: size is passed incorrectly
reshape_super() called from reshape_container() with size set to info->component_size gives size in reshape_super == -2 due to unsigned signed conversion (info->component_size is not initializes). As size is not changed during container reshape '-1' value is passed to indicate this. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
3fa436ace2
commit
d8eb27f71a
5
Grow.c
5
Grow.c
|
@ -2064,7 +2064,10 @@ int reshape_container(char *container, int cfd, char *devname,
|
|||
{
|
||||
struct mdinfo *cc = NULL;
|
||||
|
||||
if (reshape_super(st, info->component_size, info->new_level,
|
||||
/* component_size is not meaningful for a container,
|
||||
* so pass '-1' meaning 'no change'
|
||||
*/
|
||||
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))
|
||||
|
|
Loading…
Reference in New Issue