]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: be careful not to resize_stripes too big.
authorNeilBrown <neilb@suse.de>
Tue, 25 Sep 2012 07:00:43 +0000 (17:00 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 25 Sep 2012 07:00:43 +0000 (17:00 +1000)
commitfd399ceed33ebc1ebcd5bd05285126ab14152633
treece8734fe94236565f91ec099e39ef23e0df026d0
parent5f74d53512ea36ef58ef4acde2ec1dbdf68a3237
md/raid5: be careful not to resize_stripes too big.

When a RAID5 is reshaping, conf->raid_disks is increased
before mddev->delta_disks becomes zero.
This can result in check_reshape calling resize_stripes with a
number that is too large.  This particularly happens
when md_check_recovery calls ->check_reshape().

If we use ->previous_raid_disks, we don't risk this.

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