diff options
author | NeilBrown <neilb@suse.de> | 2009-03-31 15:16:46 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-03-31 15:16:46 +1100 |
commit | fef9c61fdfabf97a307c2cf3621a6949f0a4b995 (patch) | |
tree | 82b128341c12205db62fe092d692d32103a7ea9f /drivers/md/raid5.h | |
parent | cea9c22800773cecb1d41f4a6139f9eb6a95368b (diff) | |
download | linux-3.10-fef9c61fdfabf97a307c2cf3621a6949f0a4b995.tar.gz linux-3.10-fef9c61fdfabf97a307c2cf3621a6949f0a4b995.tar.bz2 linux-3.10-fef9c61fdfabf97a307c2cf3621a6949f0a4b995.zip |
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>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index c2f37f25ef4..b2edcc434e4 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -337,11 +337,16 @@ struct raid5_private_data { int raid_disks; int max_nr_stripes; - /* used during an expand */ - sector_t expand_progress; /* MaxSector when no expand happening */ - sector_t expand_lo; /* from here up to expand_progress it out-of-bounds - * as we haven't flushed the metadata yet - */ + /* reshape_progress is the leading edge of a 'reshape' + * It has value MaxSector when no reshape is happening + * If delta_disks < 0, it is the last sector we started work on, + * else is it the next sector to work on. + */ + sector_t reshape_progress; + /* reshape_safe is the trailing edge of a reshape. We know that + * before (or after) this address, all reshape has completed. + */ + sector_t reshape_safe; int previous_raid_disks; struct list_head handle_list; /* stripes needing handling */ |