diff options
author | NeilBrown <neilb@suse.de> | 2009-03-31 15:28:40 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-03-31 15:28:40 +1100 |
commit | c8f517c444e4f9f55b5b5ca202b8404691a35805 (patch) | |
tree | e679ae13a07e1a2644da0dfc4a4d66bf73f83626 /drivers/md/raid5.h | |
parent | b0f9ec047b79a92e8b8a9dfbf97537c8fbef234a (diff) |
md/raid5 revise rules for when to update metadata during reshape
We currently update the metadata :
1/ every 3Megabytes
2/ When the place we will write new-layout data to is recorded in
the metadata as still containing old-layout data.
Rule one exists to avoid having to re-do too much reshaping in the
face of a crash/restart. So it should really be time based rather
than size based. So change it to "every 10 seconds".
Rule two turns out to be too harsh when restriping an array
'in-place', as in that case the metadata much be updates for every
stripe.
For the in-place update, it can only possibly be safe from a crash if
some user-space program data a backup of every e.g. few hundred
stripes before allowing them to be reshaped. In that case, the
constant metadata update is pointless.
So only update the metadata if the new metadata will report that the
end of the 'old-layout' data is beyond where we are currently
writing 'new-layout' data.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index cdd04568172..52ba99954de 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -352,6 +352,8 @@ struct raid5_private_data { int previous_raid_disks; int prev_chunk, prev_algo; short generation; /* increments with every reshape */ + unsigned long reshape_checkpoint; /* Time we last updated + * metadata */ struct list_head handle_list; /* stripes needing handling */ struct list_head hold_list; /* preread ready stripes */ |