From: NeilBrown Date: Thu, 13 Aug 2009 00:13:00 +0000 (+1000) Subject: md/raid5: make sure a reshape restarts at the correct address. X-Git-Tag: MMI-PSA29.97-13-9~27143^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a639755cf885e437b2fe4168d35157fa90d530ab;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git md/raid5: make sure a reshape restarts at the correct address. This "if" don't allow for the possibility that the number of devices doesn't change, and so sector_nr isn't set correctly in that case. So change '>' to '>='. Signed-off-by: NeilBrown --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index b8a22a2205cf..94a74cb5cccb 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3785,7 +3785,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped conf->reshape_progress < raid5_size(mddev, 0, 0)) { sector_nr = raid5_size(mddev, 0, 0) - conf->reshape_progress; - } else if (mddev->delta_disks > 0 && + } else if (mddev->delta_disks >= 0 && conf->reshape_progress > 0) sector_nr = conf->reshape_progress; sector_div(sector_nr, new_data_disks);