]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: allow 5-device RAID6 to be reshaped to 4-device.
authorNeilBrown <neilb@suse.de>
Thu, 4 Jul 2013 06:38:16 +0000 (16:38 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 4 Jul 2013 06:42:52 +0000 (16:42 +1000)
commit5a0f350302c3524bda9157ab9852e7be56e5b73e
tree1ea7bffe6fbd61874922fb9da20c0a9157a9d71c
parentb750a4470993b67fcbf48f5fc9dc841ceef1d105
md/raid5: allow 5-device RAID6 to be reshaped to 4-device.

There is a bug in 'check_reshape' for raid5.c  To checks
that the new minimum number of devices is large enough (which is
good), but it does so also after the reshape has started (bad).

This is bad because
 - the calculation is now wrong as mddev->raid_disks has changed
   already, and
 - it is pointless because it is now too late to stop.

So only perform that test when reshape has not been committed to.

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