From d8eb27f71a19b203e86d778a4edf92b2f0aaf5bb Mon Sep 17 00:00:00 2001 From: "Kwolek, Adam" Date: Wed, 12 Jan 2011 21:42:44 +1100 Subject: [PATCH] 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 --- Grow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- 2.39.5