FIX: Raid0 expansion cannot be restarted

When raid0 expansion is restarted, mdadm refuses to correctly assemble
array because critical section cannot be restored from backup file.
mdadm exits with information:
	mdadm: Failed to restore critical section for reshape - sorry.

For raid0 new level is 0, current array level is 4.
Function Grow_restart() doesn't allow for level change.

Grow_restart really shouldn't be checking for level changes.
As they are always instantaneous they should never appear
in the metadata so it doesn't mean anything to check for them.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-04-11 15:00:13 +10:00 committed by NeilBrown
parent 8ccca44dde
commit b357ef43f9
1 changed files with 0 additions and 3 deletions

3
Grow.c
View File

@ -3102,9 +3102,6 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
unsigned long long nstripe, ostripe;
int ndata, odata;
if (info->new_level != info->array.level)
return 1; /* Cannot handle level changes (they are instantaneous) */
odata = info->array.raid_disks - info->delta_disks - 1;
if (info->array.level == 6) odata--; /* number of data disks */
ndata = info->array.raid_disks - 1;