diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-27 05:12:07 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:34:45 -0500 |
commit | 422028b1ca4c07995af82a18abced022ff4c296c (patch) | |
tree | 87583c3aab3d8b39c5210de800d5eae79941dc25 /include | |
parent | 759fbdfba66e620aceb3e73167e6003d1b8b0b0b (diff) |
drbd: New configuration parameters for dealing with network congestion
net {
on_congestion {block|pull-ahead|disconnect};
congestion-fill {sectors};
congestion-extents {al-extents};
}
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/drbd.h | 7 | ||||
-rw-r--r-- | include/linux/drbd_limits.h | 9 | ||||
-rw-r--r-- | include/linux/drbd_nl.h | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index ef44c7a0638c..03a08baabf11 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -96,6 +96,12 @@ enum drbd_on_no_data { | |||
96 | OND_SUSPEND_IO | 96 | OND_SUSPEND_IO |
97 | }; | 97 | }; |
98 | 98 | ||
99 | enum drbd_on_congestion { | ||
100 | OC_BLOCK, | ||
101 | OC_PULL_AHEAD, | ||
102 | OC_DISCONNECT, | ||
103 | }; | ||
104 | |||
99 | /* KEEP the order, do not delete or insert. Only append. */ | 105 | /* KEEP the order, do not delete or insert. Only append. */ |
100 | enum drbd_ret_codes { | 106 | enum drbd_ret_codes { |
101 | ERR_CODE_BASE = 100, | 107 | ERR_CODE_BASE = 100, |
@@ -146,6 +152,7 @@ enum drbd_ret_codes { | |||
146 | ERR_PERM = 152, | 152 | ERR_PERM = 152, |
147 | ERR_NEED_APV_93 = 153, | 153 | ERR_NEED_APV_93 = 153, |
148 | ERR_STONITH_AND_PROT_A = 154, | 154 | ERR_STONITH_AND_PROT_A = 154, |
155 | ERR_CONG_NOT_PROTO_A = 155, | ||
149 | 156 | ||
150 | /* insert new ones above this line */ | 157 | /* insert new ones above this line */ |
151 | AFTER_LAST_ERR_CODE | 158 | AFTER_LAST_ERR_CODE |
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index 4ac33f34b77e..abf418724e52 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h | |||
@@ -129,6 +129,7 @@ | |||
129 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT | 129 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT |
130 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT | 130 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT |
131 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR | 131 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR |
132 | #define DRBD_ON_CONGESTION_DEF OC_BLOCK | ||
132 | 133 | ||
133 | #define DRBD_MAX_BIO_BVECS_MIN 0 | 134 | #define DRBD_MAX_BIO_BVECS_MIN 0 |
134 | #define DRBD_MAX_BIO_BVECS_MAX 128 | 135 | #define DRBD_MAX_BIO_BVECS_MAX 128 |
@@ -154,5 +155,13 @@ | |||
154 | #define DRBD_C_MIN_RATE_MAX (4 << 20) | 155 | #define DRBD_C_MIN_RATE_MAX (4 << 20) |
155 | #define DRBD_C_MIN_RATE_DEF 4096 | 156 | #define DRBD_C_MIN_RATE_DEF 4096 |
156 | 157 | ||
158 | #define DRBD_CONG_FILL_MIN 0 | ||
159 | #define DRBD_CONG_FILL_MAX (10<<21) /* 10GByte in sectors */ | ||
160 | #define DRBD_CONG_FILL_DEF 0 | ||
161 | |||
162 | #define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN | ||
163 | #define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX | ||
164 | #define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF | ||
165 | |||
157 | #undef RANGE | 166 | #undef RANGE |
158 | #endif | 167 | #endif |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index ade91107c9a5..8cde3945d1f7 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -56,6 +56,9 @@ NL_PACKET(net_conf, 5, | |||
56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) | 56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) |
57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) | 57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) |
58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) | 58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) |
59 | NL_INTEGER( 81, T_MAY_IGNORE, on_congestion) | ||
60 | NL_INTEGER( 82, T_MAY_IGNORE, cong_fill) | ||
61 | NL_INTEGER( 83, T_MAY_IGNORE, cong_extents) | ||
59 | /* 59 addr_family was available in GIT, never released */ | 62 | /* 59 addr_family was available in GIT, never released */ |
60 | NL_BIT( 60, T_MANDATORY, mind_af) | 63 | NL_BIT( 60, T_MANDATORY, mind_af) |
61 | NL_BIT( 27, T_MAY_IGNORE, want_lose) | 64 | NL_BIT( 27, T_MAY_IGNORE, want_lose) |