md/raid5: allow for change in data_offset while managing a reshape.

The important issue here is incorporating the different in data_offset
into calculations concerning when we might need to over-write data
that is still thought to be valid.

To this end we find the minimum offset difference across all devices
and add that where appropriate.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown
2012-05-21 09:27:01 +10:00
parent 05616be5e1
commit b5254dd5fd
2 changed files with 82 additions and 33 deletions

View File

@@ -385,6 +385,12 @@ struct r5conf {
short generation; /* increments with every reshape */
unsigned long reshape_checkpoint; /* Time we last updated
* metadata */
long long min_offset_diff; /* minimum difference between
* data_offset and
* new_data_offset across all
* devices. May be negative,
* but is closest to zero.
*/
struct list_head handle_list; /* stripes needing handling */
struct list_head hold_list; /* preread ready stripes */