]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
md/raid5: set reshape_position correctly when reshape starts.
authorNeilBrown <neilb@suse.de>
Mon, 3 Aug 2009 00:59:57 +0000 (10:59 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 3 Aug 2009 00:59:57 +0000 (10:59 +1000)
As the internal reshape_progress counter is the main driver
for reshape, the fact that reshape_position sometimes starts with the
wrong value has minimal effect.  It is visible in sysfs and that
is all.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c

index 39374230a463798dfc1314fcd2730e98c4f1fe3e..659151e5eda45547806377a78f60b4c8c260c6fb 100644 (file)
@@ -5000,7 +5000,7 @@ static int raid5_start_reshape(mddev_t *mddev)
                spin_unlock_irqrestore(&conf->device_lock, flags);
        }
        mddev->raid_disks = conf->raid_disks;
-       mddev->reshape_position = 0;
+       mddev->reshape_position = conf->reshape_progress;
        set_bit(MD_CHANGE_DEVS, &mddev->flags);
 
        clear_bit(MD_RECOVERY_SYNC, &mddev->recovery);