Create: Don't optimise resync as recovery when creating raid5 in a container.

As spares are treated quite differently in containers, we cannot
fake-up a spare to optimise initialisation for a raid5 in a container,
so disable that code for ->external arrays.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2008-11-04 20:51:12 +11:00
parent f2e55eccfb
commit 87b47257eb
1 changed files with 2 additions and 1 deletions

View File

@ -389,7 +389,8 @@ int Create(struct supertype *st, char *mddev,
* as missing, so that a reconstruct happens (faster than re-parity) * as missing, so that a reconstruct happens (faster than re-parity)
* FIX: Can we do this for raid6 as well? * FIX: Can we do this for raid6 as well?
*/ */
if (assume_clean==0 && force == 0 && first_missing >= raiddisks) { if (st->ss->external == 0 &&
assume_clean==0 && force == 0 && first_missing >= raiddisks) {
switch ( level ) { switch ( level ) {
case 4: case 4:
case 5: case 5: