diff options
author | NeilBrown <neilb@suse.de> | 2012-05-21 09:28:33 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-05-21 09:28:33 +1000 |
commit | f8c9e74ff0832f2244d7991d2aea13851b20a622 (patch) | |
tree | db07ef3ecc00f83d3d9b854929a4cb13def456a7 /drivers/md/raid10.h | |
parent | c804cdecea418c067ee7359d62139b2b3c8cec39 (diff) | |
download | op-kernel-dev-f8c9e74ff0832f2244d7991d2aea13851b20a622.zip op-kernel-dev-f8c9e74ff0832f2244d7991d2aea13851b20a622.tar.gz |
md/raid10: Introduce 'prev' geometry to support reshape.
When RAID10 supports reshape it will need a 'previous' and a 'current'
geometry, so introduce that here.
Use the 'prev' geometry when before the reshape_position, and the
current 'geo' when beyond it. At other times, use both as
appropriate.
For now, both are identical (And reshape_position is never set).
When we use the 'prev' geometry, we must use the old data_offset.
When we use the current (And a reshape is happening) we must use
the new_data_offset.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.h')
-rw-r--r-- | drivers/md/raid10.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index 4c4942a..37509d7 100644 --- a/drivers/md/raid10.h +++ b/drivers/md/raid10.h @@ -34,13 +34,14 @@ struct r10conf { */ int chunk_shift; /* shift from chunks to sectors */ sector_t chunk_mask; - } geo; + } prev, geo; int copies; /* near_copies * far_copies. * must be <= raid_disks */ sector_t dev_sectors; /* temp copy of * mddev->dev_sectors */ + sector_t reshape_progress; struct list_head retry_list; /* queue pending writes and submit them on unplug */ @@ -147,5 +148,10 @@ enum r10bio_state { */ R10BIO_MadeGood, R10BIO_WriteError, +/* During a reshape we might be performing IO on the + * 'previous' part of the array, in which case this + * flag is set + */ + R10BIO_Previous, }; #endif |