]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid5: be careful not to resize_stripes too big.
authorNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:28 +0000 (12:37 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:28 +0000 (12:37 +1000)
commit391eb7e5e95934be5f2a9f9790bd4a44bc59232a
tree12021b16ef3a9952c970e53e036134fe36c0b1f5
parenta116f8e5e1a21d0b28de4084cc57a2e158a41fe1
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