From: NeilBrown Date: Tue, 6 Mar 2012 23:47:34 +0000 (+1100) Subject: Assemble: support assembling of a RAID0 being reshaped. X-Git-Tag: mdadm-3.2.4~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b720636a5849397dbc6dc1b0f0b671d17034a28b;p=thirdparty%2Fmdadm.git Assemble: support assembling of a RAID0 being reshaped. This is a bit of a hack and the code need to be made more general. But this adds the special case of a RAID0 being reshaped which looks like a RAID4 but doesn't need as many devices. Signed-off-by: NeilBrown --- diff --git a/Assemble.c b/Assemble.c index 0af8ad86..fadacf5f 100644 --- a/Assemble.c +++ b/Assemble.c @@ -976,7 +976,9 @@ int Assemble(struct supertype *st, char *mddev, if (i < content->array.raid_disks) { if (devices[j].i.recovery_start == MaxSector || (content->reshape_active && - j >= content->array.raid_disks - content->delta_disks)) { + ((i >= content->array.raid_disks - content->delta_disks) || + (i >= content->array.raid_disks - content->delta_disks - 1 + && content->array.level == 4)))) { okcnt++; avail[i]=1; } else