From: Krzysztof Wojcik Date: Mon, 17 Jan 2011 01:53:31 +0000 (+1100) Subject: Set reshape.after.data_disks for raid0<->raid10 takeover X-Git-Tag: mdadm-3.2~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=031d445c18a91eb140ce87cd05b0d3fec1f1b215;p=thirdparty%2Fmdadm.git Set reshape.after.data_disks for raid0<->raid10 takeover reshape.after.data_disks field must be initiated for raid0<->raid10 transition. Instead calculated spares_needed variable in reshape_array function has random value. Signed-off-by: Krzysztof Wojcik Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 447e87e5..e9a26749 100644 --- a/Grow.c +++ b/Grow.c @@ -970,6 +970,7 @@ char *analyse_change(struct mdinfo *info, struct reshape *re) re->level = 0; re->parity = 0; re->before.data_disks = new_disks; + re->after.data_disks = re->before.data_disks; re->before.layout = 0; re->backup_blocks = 0; return NULL; @@ -1007,6 +1008,7 @@ char *analyse_change(struct mdinfo *info, struct reshape *re) re->parity = 0; re->before.data_disks = (info->array.raid_disks + info->delta_disks); + re->after.data_disks = re->before.data_disks; re->before.layout = info->new_layout; re->backup_blocks = 0; return NULL;