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 <neilb@suse.de>
This commit is contained in:
NeilBrown 2012-03-07 10:47:34 +11:00
parent 56d1885944
commit b720636a58
1 changed files with 3 additions and 1 deletions

View File

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