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