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:
Kwolek, Adam 2011-01-12 21:42:44 +11:00 committed by NeilBrown
parent 3fa436ace2
commit d8eb27f71a
1 changed files with 4 additions and 1 deletions

5
Grow.c
View File

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