]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
FIX: Raid0 expansion cannot be restarted
authorAdam Kwolek <adam.kwolek@intel.com>
Mon, 11 Apr 2011 05:00:13 +0000 (15:00 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 11 Apr 2011 05:00:13 +0000 (15:00 +1000)
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>
Grow.c

diff --git a/Grow.c b/Grow.c
index d6ecde2deea71072ee17c794af34f6b7ea4f9e5f..d4308bcf3811d55ba14f4ef6d62f3fd558746826 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -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;