diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-07-06 05:14:00 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-14 12:38:14 -0400 |
commit | 778f271dfe7a7173c0bae2d6cde8d9bd1533e668 (patch) | |
tree | 1c057622152bd652102749b488653bff8be24c2a /drivers/block/drbd/drbd_int.h | |
parent | 8e26f9ccb9be00fdb33551a34c8f6029e89ab79f (diff) |
drbd: The new, smarter resync speed controller
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_int.h')
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index fd2cdd45f155..facb72ccc56b 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -928,6 +928,12 @@ enum write_ordering_e { | |||
928 | WO_bio_barrier | 928 | WO_bio_barrier |
929 | }; | 929 | }; |
930 | 930 | ||
931 | struct fifo_buffer { | ||
932 | int *values; | ||
933 | unsigned int head_index; | ||
934 | unsigned int size; | ||
935 | }; | ||
936 | |||
931 | struct drbd_conf { | 937 | struct drbd_conf { |
932 | /* things that are stored as / read from meta data on disk */ | 938 | /* things that are stored as / read from meta data on disk */ |
933 | unsigned long flags; | 939 | unsigned long flags; |
@@ -1068,6 +1074,11 @@ struct drbd_conf { | |||
1068 | u64 ed_uuid; /* UUID of the exposed data */ | 1074 | u64 ed_uuid; /* UUID of the exposed data */ |
1069 | struct mutex state_mutex; | 1075 | struct mutex state_mutex; |
1070 | char congestion_reason; /* Why we where congested... */ | 1076 | char congestion_reason; /* Why we where congested... */ |
1077 | atomic_t rs_sect_in; /* counter to measure the incoming resync data rate */ | ||
1078 | int c_sync_rate; /* current resync rate after delay_probe magic */ | ||
1079 | struct fifo_buffer rs_plan_s; /* correction values of resync planer */ | ||
1080 | int rs_in_flight; /* resync sectors in flight (to proxy, in proxy and from proxy) */ | ||
1081 | int rs_planed; /* resync sectors already planed */ | ||
1071 | }; | 1082 | }; |
1072 | 1083 | ||
1073 | static inline struct drbd_conf *minor_to_mdev(unsigned int minor) | 1084 | static inline struct drbd_conf *minor_to_mdev(unsigned int minor) |