md/raid5: change reshape-progress measurement to cope with reshaping backwards.
authorNeilBrown <neilb@suse.de>
Tue, 31 Mar 2009 04:16:46 +0000 (15:16 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 31 Mar 2009 04:16:46 +0000 (15:16 +1100)
commitfef9c61fdfabf97a307c2cf3621a6949f0a4b995
tree82b128341c12205db62fe092d692d32103a7ea9f
parentcea9c22800773cecb1d41f4a6139f9eb6a95368b
md/raid5: change reshape-progress measurement to cope with reshaping backwards.

When reducing the number of devices in a raid4/5/6, the reshape
process has to start at the end of the array and work down to the
beginning.  So we need to handle expand_progress and expand_lo
differently.

This patch renames "expand_progress" and "expand_lo" to avoid the
implication that anything is getting bigger (expand->reshape) and
every place they are used, we make sure that they are used the right
way depending on whether delta_disks is positive or negative.

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