diff options
author | NeilBrown <neilb@suse.de> | 2009-03-31 15:19:07 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-03-31 15:19:07 +1100 |
commit | 784052ecc6ade6b6acf4f67e4ada8e5f2e6df446 (patch) | |
tree | f0b1060215922ba30a4d676a00dbdad8ddb724c9 /drivers/md/raid5.h | |
parent | 86b42c713be3e5f6807aa14b4cbdb005d35c64d5 (diff) |
md/raid5: prepare for allowing reshape to change chunksize.
Add "prev_chunk" to raid5_conf_t, similar to "previous_raid_disks", to
remember what the chunk size was before the reshape that is currently
underway.
This seems like duplication with "chunk_size" and "new_chunk" in
mddev_t, and to some extent it is, but there are differences.
The values in mddev_t are always defined and often the same.
The prev* values are only defined if a reshape is underway.
Also (and more significantly) the raid5_conf_t values will be changed
at the same time (inside an appropriate lock) that the reshape is
started by setting reshape_position. In contrast, the new_chunk value
is set when the sysfs file is written which could be well before the
reshape starts.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index a081fb40a5a2..b9c93280fc1d 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -350,6 +350,7 @@ struct raid5_private_data { */ sector_t reshape_safe; int previous_raid_disks; + int prev_chunk; short generation; /* increments with every reshape */ struct list_head handle_list; /* stripes needing handling */ |