diff options
author | NeilBrown <neilb@suse.de> | 2009-03-31 00:19:03 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-03-31 00:19:03 -0400 |
commit | 86b42c713be3e5f6807aa14b4cbdb005d35c64d5 (patch) | |
tree | d6c70a966a6bda99e6cd4ce055efa84ab0ded701 /drivers/md/raid5.h | |
parent | 11373542344bdc35be1e6e68b0baadd1b6f7acbb (diff) |
md/raid5: clearly differentiate 'before' and 'after' stripes during reshape.
During a raid5 reshape, we have some stripes in the cache that are
'before' the reshape (and are still to be processed) and some that are
'after'. They are currently differentiated by having different
->disks values as the only reshape current supported involves changing
the number of disks.
However we will soon support reshapes that do not change the number
of disks (chunk parity or chunk size). So make the difference more
explicit with a 'generation' number.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index b2edcc434e41..a081fb40a5a2 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h | |||
@@ -198,6 +198,8 @@ struct stripe_head { | |||
198 | struct hlist_node hash; | 198 | struct hlist_node hash; |
199 | struct list_head lru; /* inactive_list or handle_list */ | 199 | struct list_head lru; /* inactive_list or handle_list */ |
200 | struct raid5_private_data *raid_conf; | 200 | struct raid5_private_data *raid_conf; |
201 | short generation; /* increments with every | ||
202 | * reshape */ | ||
201 | sector_t sector; /* sector of this row */ | 203 | sector_t sector; /* sector of this row */ |
202 | short pd_idx; /* parity disk index */ | 204 | short pd_idx; /* parity disk index */ |
203 | short qd_idx; /* 'Q' disk index for raid6 */ | 205 | short qd_idx; /* 'Q' disk index for raid6 */ |
@@ -348,6 +350,7 @@ struct raid5_private_data { | |||
348 | */ | 350 | */ |
349 | sector_t reshape_safe; | 351 | sector_t reshape_safe; |
350 | int previous_raid_disks; | 352 | int previous_raid_disks; |
353 | short generation; /* increments with every reshape */ | ||
351 | 354 | ||
352 | struct list_head handle_list; /* stripes needing handling */ | 355 | struct list_head handle_list; /* stripes needing handling */ |
353 | struct list_head hold_list; /* preread ready stripes */ | 356 | struct list_head hold_list; /* preread ready stripes */ |