aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/drbd_limits.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-05-09 12:26:20 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:57:53 -0500
commit32bdb64038ba3127245912dae2cc8a450bb1d705 (patch)
tree60e158135ca88c9b5cf5c1a9ed058288816ce13d /include/linux/drbd_limits.h
parent65d94927e036cd8e8e1406fa7fc387b4ae730159 (diff)
drbd: Define scale factors in a single place
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include/linux/drbd_limits.h')
-rw-r--r--include/linux/drbd_limits.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h
index defdebfecb72..cd3565cfed44 100644
--- a/include/linux/drbd_limits.h
+++ b/include/linux/drbd_limits.h
@@ -18,29 +18,35 @@
18#define DRBD_MINOR_COUNT_MIN 1 18#define DRBD_MINOR_COUNT_MIN 1
19#define DRBD_MINOR_COUNT_MAX (1U << 20) 19#define DRBD_MINOR_COUNT_MAX (1U << 20)
20#define DRBD_MINOR_COUNT_DEF 32 20#define DRBD_MINOR_COUNT_DEF 32
21#define DRBD_MINOR_COUNT_SCALE '1'
21 22
22#define DRBD_VOLUME_MAX 65535 23#define DRBD_VOLUME_MAX 65535
23 24
24#define DRBD_DIALOG_REFRESH_MIN 0 25#define DRBD_DIALOG_REFRESH_MIN 0
25#define DRBD_DIALOG_REFRESH_MAX 600 26#define DRBD_DIALOG_REFRESH_MAX 600
27#define DRBD_DIALOG_REFRESH_SCALE '1'
26 28
27/* valid port number */ 29/* valid port number */
28#define DRBD_PORT_MIN 1 30#define DRBD_PORT_MIN 1
29#define DRBD_PORT_MAX 0xffff 31#define DRBD_PORT_MAX 0xffff
32#define DRBD_PORT_SCALE '1'
30 33
31/* startup { */ 34/* startup { */
32 /* if you want more than 3.4 days, disable */ 35 /* if you want more than 3.4 days, disable */
33#define DRBD_WFC_TIMEOUT_MIN 0 36#define DRBD_WFC_TIMEOUT_MIN 0
34#define DRBD_WFC_TIMEOUT_MAX 300000 37#define DRBD_WFC_TIMEOUT_MAX 300000
35#define DRBD_WFC_TIMEOUT_DEF 0 38#define DRBD_WFC_TIMEOUT_DEF 0
39#define DRBD_WFC_TIMEOUT_SCALE '1'
36 40
37#define DRBD_DEGR_WFC_TIMEOUT_MIN 0 41#define DRBD_DEGR_WFC_TIMEOUT_MIN 0
38#define DRBD_DEGR_WFC_TIMEOUT_MAX 300000 42#define DRBD_DEGR_WFC_TIMEOUT_MAX 300000
39#define DRBD_DEGR_WFC_TIMEOUT_DEF 0 43#define DRBD_DEGR_WFC_TIMEOUT_DEF 0
44#define DRBD_DEGR_WFC_TIMEOUT_SCALE '1'
40 45
41#define DRBD_OUTDATED_WFC_TIMEOUT_MIN 0 46#define DRBD_OUTDATED_WFC_TIMEOUT_MIN 0
42#define DRBD_OUTDATED_WFC_TIMEOUT_MAX 300000 47#define DRBD_OUTDATED_WFC_TIMEOUT_MAX 300000
43#define DRBD_OUTDATED_WFC_TIMEOUT_DEF 0 48#define DRBD_OUTDATED_WFC_TIMEOUT_DEF 0
49#define DRBD_OUTDATED_WFC_TIMEOUT_SCALE '1'
44/* }*/ 50/* }*/
45 51
46/* net { */ 52/* net { */
@@ -49,6 +55,7 @@
49#define DRBD_TIMEOUT_MIN 1 55#define DRBD_TIMEOUT_MIN 1
50#define DRBD_TIMEOUT_MAX 600 56#define DRBD_TIMEOUT_MAX 600
51#define DRBD_TIMEOUT_DEF 60 /* 6 seconds */ 57#define DRBD_TIMEOUT_DEF 60 /* 6 seconds */
58#define DRBD_TIMEOUT_SCALE '1'
52 59
53 /* If backing disk takes longer than disk_timeout, mark the disk as failed */ 60 /* If backing disk takes longer than disk_timeout, mark the disk as failed */
54#define DRBD_DISK_TIMEOUT_MIN 0 /* 0 = disabled */ 61#define DRBD_DISK_TIMEOUT_MIN 0 /* 0 = disabled */
@@ -60,46 +67,55 @@
60#define DRBD_CONNECT_INT_MIN 1 67#define DRBD_CONNECT_INT_MIN 1
61#define DRBD_CONNECT_INT_MAX 120 68#define DRBD_CONNECT_INT_MAX 120
62#define DRBD_CONNECT_INT_DEF 10 /* seconds */ 69#define DRBD_CONNECT_INT_DEF 10 /* seconds */
70#define DRBD_CONNECT_INT_SCALE '1'
63 71
64 /* keep-alive probes when idle */ 72 /* keep-alive probes when idle */
65#define DRBD_PING_INT_MIN 1 73#define DRBD_PING_INT_MIN 1
66#define DRBD_PING_INT_MAX 120 74#define DRBD_PING_INT_MAX 120
67#define DRBD_PING_INT_DEF 10 75#define DRBD_PING_INT_DEF 10
76#define DRBD_PING_INT_SCALE '1'
68 77
69 /* timeout for the ping packets.*/ 78 /* timeout for the ping packets.*/
70#define DRBD_PING_TIMEO_MIN 1 79#define DRBD_PING_TIMEO_MIN 1
71#define DRBD_PING_TIMEO_MAX 300 80#define DRBD_PING_TIMEO_MAX 300
72#define DRBD_PING_TIMEO_DEF 5 81#define DRBD_PING_TIMEO_DEF 5
82#define DRBD_PING_TIMEO_SCALE '1'
73 83
74 /* max number of write requests between write barriers */ 84 /* max number of write requests between write barriers */
75#define DRBD_MAX_EPOCH_SIZE_MIN 1 85#define DRBD_MAX_EPOCH_SIZE_MIN 1
76#define DRBD_MAX_EPOCH_SIZE_MAX 20000 86#define DRBD_MAX_EPOCH_SIZE_MAX 20000
77#define DRBD_MAX_EPOCH_SIZE_DEF 2048 87#define DRBD_MAX_EPOCH_SIZE_DEF 2048
88#define DRBD_MAX_EPOCH_SIZE_SCALE '1'
78 89
79 /* I don't think that a tcp send buffer of more than 10M is useful */ 90 /* I don't think that a tcp send buffer of more than 10M is useful */
80#define DRBD_SNDBUF_SIZE_MIN 0 91#define DRBD_SNDBUF_SIZE_MIN 0
81#define DRBD_SNDBUF_SIZE_MAX (10<<20) 92#define DRBD_SNDBUF_SIZE_MAX (10<<20)
82#define DRBD_SNDBUF_SIZE_DEF 0 93#define DRBD_SNDBUF_SIZE_DEF 0
94#define DRBD_SNDBUF_SIZE_SCALE '1'
83 95
84#define DRBD_RCVBUF_SIZE_MIN 0 96#define DRBD_RCVBUF_SIZE_MIN 0
85#define DRBD_RCVBUF_SIZE_MAX (10<<20) 97#define DRBD_RCVBUF_SIZE_MAX (10<<20)
86#define DRBD_RCVBUF_SIZE_DEF 0 98#define DRBD_RCVBUF_SIZE_DEF 0
99#define DRBD_RCVBUF_SIZE_SCALE '1'
87 100
88 /* @4k PageSize -> 128kB - 512MB */ 101 /* @4k PageSize -> 128kB - 512MB */
89#define DRBD_MAX_BUFFERS_MIN 32 102#define DRBD_MAX_BUFFERS_MIN 32
90#define DRBD_MAX_BUFFERS_MAX 131072 103#define DRBD_MAX_BUFFERS_MAX 131072
91#define DRBD_MAX_BUFFERS_DEF 2048 104#define DRBD_MAX_BUFFERS_DEF 2048
105#define DRBD_MAX_BUFFERS_SCALE '1'
92 106
93 /* @4k PageSize -> 4kB - 512MB */ 107 /* @4k PageSize -> 4kB - 512MB */
94#define DRBD_UNPLUG_WATERMARK_MIN 1 108#define DRBD_UNPLUG_WATERMARK_MIN 1
95#define DRBD_UNPLUG_WATERMARK_MAX 131072 109#define DRBD_UNPLUG_WATERMARK_MAX 131072
96#define DRBD_UNPLUG_WATERMARK_DEF (DRBD_MAX_BUFFERS_DEF/16) 110#define DRBD_UNPLUG_WATERMARK_DEF (DRBD_MAX_BUFFERS_DEF/16)
111#define DRBD_UNPLUG_WATERMARK_SCALE '1'
97 112
98 /* 0 is disabled. 113 /* 0 is disabled.
99 * 200 should be more than enough even for very short timeouts */ 114 * 200 should be more than enough even for very short timeouts */
100#define DRBD_KO_COUNT_MIN 0 115#define DRBD_KO_COUNT_MIN 0
101#define DRBD_KO_COUNT_MAX 200 116#define DRBD_KO_COUNT_MAX 200
102#define DRBD_KO_COUNT_DEF 7 117#define DRBD_KO_COUNT_DEF 7
118#define DRBD_KO_COUNT_SCALE '1'
103/* } */ 119/* } */
104 120
105/* syncer { */ 121/* syncer { */
@@ -118,6 +134,7 @@
118#define DRBD_AL_EXTENTS_MIN 7 134#define DRBD_AL_EXTENTS_MIN 7
119#define DRBD_AL_EXTENTS_MAX 6433 135#define DRBD_AL_EXTENTS_MAX 6433
120#define DRBD_AL_EXTENTS_DEF 1237 136#define DRBD_AL_EXTENTS_DEF 1237
137#define DRBD_AL_EXTENTS_SCALE '1'
121 138
122#define DRBD_MINOR_NUMBER_MIN -1 139#define DRBD_MINOR_NUMBER_MIN -1
123#define DRBD_MINOR_NUMBER_MAX (1<<30) 140#define DRBD_MINOR_NUMBER_MAX (1<<30)
@@ -148,34 +165,42 @@
148#define DRBD_MAX_BIO_BVECS_MIN 0 165#define DRBD_MAX_BIO_BVECS_MIN 0
149#define DRBD_MAX_BIO_BVECS_MAX 128 166#define DRBD_MAX_BIO_BVECS_MAX 128
150#define DRBD_MAX_BIO_BVECS_DEF 0 167#define DRBD_MAX_BIO_BVECS_DEF 0
168#define DRBD_MAX_BIO_BVECS_SCALE '1'
151 169
152#define DRBD_C_PLAN_AHEAD_MIN 0 170#define DRBD_C_PLAN_AHEAD_MIN 0
153#define DRBD_C_PLAN_AHEAD_MAX 300 171#define DRBD_C_PLAN_AHEAD_MAX 300
154#define DRBD_C_PLAN_AHEAD_DEF 20 172#define DRBD_C_PLAN_AHEAD_DEF 20
173#define DRBD_C_PLAN_AHEAD_SCALE '1'
155 174
156#define DRBD_C_DELAY_TARGET_MIN 1 175#define DRBD_C_DELAY_TARGET_MIN 1
157#define DRBD_C_DELAY_TARGET_MAX 100 176#define DRBD_C_DELAY_TARGET_MAX 100
158#define DRBD_C_DELAY_TARGET_DEF 10 177#define DRBD_C_DELAY_TARGET_DEF 10
178#define DRBD_C_DELAY_TARGET_SCALE '1'
159 179
160#define DRBD_C_FILL_TARGET_MIN 0 180#define DRBD_C_FILL_TARGET_MIN 0
161#define DRBD_C_FILL_TARGET_MAX (1<<20) /* 500MByte in sec */ 181#define DRBD_C_FILL_TARGET_MAX (1<<20) /* 500MByte in sec */
162#define DRBD_C_FILL_TARGET_DEF 100 /* Try to place 50KiB in socket send buffer during resync */ 182#define DRBD_C_FILL_TARGET_DEF 100 /* Try to place 50KiB in socket send buffer during resync */
183#define DRBD_C_FILL_TARGET_SCALE 's' /* sectors */
163 184
164#define DRBD_C_MAX_RATE_MIN 250 /* kByte/sec */ 185#define DRBD_C_MAX_RATE_MIN 250
165#define DRBD_C_MAX_RATE_MAX (4 << 20) 186#define DRBD_C_MAX_RATE_MAX (4 << 20)
166#define DRBD_C_MAX_RATE_DEF 102400 187#define DRBD_C_MAX_RATE_DEF 102400
188#define DRBD_C_MAX_RATE_SCALE 'k' /* kilobytes */
167 189
168#define DRBD_C_MIN_RATE_MIN 0 /* kByte/sec */ 190#define DRBD_C_MIN_RATE_MIN 0
169#define DRBD_C_MIN_RATE_MAX (4 << 20) 191#define DRBD_C_MIN_RATE_MAX (4 << 20)
170#define DRBD_C_MIN_RATE_DEF 250 192#define DRBD_C_MIN_RATE_DEF 250
193#define DRBD_C_MIN_RATE_SCALE 'k' /* kilobytes */
171 194
172#define DRBD_CONG_FILL_MIN 0 195#define DRBD_CONG_FILL_MIN 0
173#define DRBD_CONG_FILL_MAX (10<<21) /* 10GByte in sectors */ 196#define DRBD_CONG_FILL_MAX (10<<21) /* 10GByte in sectors */
174#define DRBD_CONG_FILL_DEF 0 197#define DRBD_CONG_FILL_DEF 0
198#define DRBD_CONG_FILL_SCALE 's' /* sectors */
175 199
176#define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN 200#define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN
177#define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX 201#define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX
178#define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF 202#define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF
203#define DRBD_CONG_EXTENTS_SCALE DRBD_AL_EXTENTS_SCALE
179 204
180#define DRBD_PROTOCOL_DEF DRBD_PROT_C 205#define DRBD_PROTOCOL_DEF DRBD_PROT_C
181 206