From: Kwolek, Adam Date: Wed, 12 Jan 2011 10:42:44 +0000 (+1100) Subject: FIX: size is passed incorrectly X-Git-Tag: mdadm-3.2~91 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=commitdiff_plain;h=d8eb27f71a19b203e86d778a4edf92b2f0aaf5bb 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 Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index b3edbc59..898eb3eb 100644 --- a/Grow.c +++ b/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))