aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/drbd.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 09:43:54 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 10:06:11 -0400
commit7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch)
tree5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /include/linux/drbd.h
parent7d754596756240fa918b94cd0c3011c77a638987 (diff)
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff)
Merge 'Linux v3.0' into Litmus
Some notes: * Litmus^RT scheduling class is the topmost scheduling class (above stop_sched_class). * scheduler_ipi() function (e.g., in smp_reschedule_interrupt()) may increase IPI latencies. * Added path into schedule() to quickly re-evaluate scheduling decision without becoming preemptive again. This used to be a standard path before the removal of BKL. Conflicts: Makefile arch/arm/kernel/calls.S arch/arm/kernel/smp.c arch/x86/include/asm/unistd_32.h arch/x86/kernel/smp.c arch/x86/kernel/syscall_table_32.S include/linux/hrtimer.h kernel/printk.c kernel/sched.c kernel/sched_fair.c
Diffstat (limited to 'include/linux/drbd.h')
-rw-r--r--include/linux/drbd.h53
1 files changed, 39 insertions, 14 deletions
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 479ee3a1d901..9e5f5607eba3 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -36,9 +36,9 @@
36#include <sys/wait.h> 36#include <sys/wait.h>
37#include <limits.h> 37#include <limits.h>
38 38
39/* Altough the Linux source code makes a difference between 39/* Although the Linux source code makes a difference between
40 generic endianness and the bitfields' endianness, there is no 40 generic endianness and the bitfields' endianness, there is no
41 architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness 41 architecture as of Linux-2.6.24-rc4 where the bitfields' endianness
42 does not match the generic endianness. */ 42 does not match the generic endianness. */
43 43
44#if __BYTE_ORDER == __LITTLE_ENDIAN 44#if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -53,10 +53,10 @@
53 53
54 54
55extern const char *drbd_buildtag(void); 55extern const char *drbd_buildtag(void);
56#define REL_VERSION "8.3.8.1" 56#define REL_VERSION "8.3.11"
57#define API_VERSION 88 57#define API_VERSION 88
58#define PRO_VERSION_MIN 86 58#define PRO_VERSION_MIN 86
59#define PRO_VERSION_MAX 94 59#define PRO_VERSION_MAX 96
60 60
61 61
62enum drbd_io_error_p { 62enum drbd_io_error_p {
@@ -91,8 +91,19 @@ enum drbd_after_sb_p {
91 ASB_VIOLENTLY 91 ASB_VIOLENTLY
92}; 92};
93 93
94enum drbd_on_no_data {
95 OND_IO_ERROR,
96 OND_SUSPEND_IO
97};
98
99enum drbd_on_congestion {
100 OC_BLOCK,
101 OC_PULL_AHEAD,
102 OC_DISCONNECT,
103};
104
94/* KEEP the order, do not delete or insert. Only append. */ 105/* KEEP the order, do not delete or insert. Only append. */
95enum drbd_ret_codes { 106enum drbd_ret_code {
96 ERR_CODE_BASE = 100, 107 ERR_CODE_BASE = 100,
97 NO_ERROR = 101, 108 NO_ERROR = 101,
98 ERR_LOCAL_ADDR = 102, 109 ERR_LOCAL_ADDR = 102,
@@ -140,6 +151,10 @@ enum drbd_ret_codes {
140 ERR_CONNECTED = 151, /* DRBD 8.3 only */ 151 ERR_CONNECTED = 151, /* DRBD 8.3 only */
141 ERR_PERM = 152, 152 ERR_PERM = 152,
142 ERR_NEED_APV_93 = 153, 153 ERR_NEED_APV_93 = 153,
154 ERR_STONITH_AND_PROT_A = 154,
155 ERR_CONG_NOT_PROTO_A = 155,
156 ERR_PIC_AFTER_DEP = 156,
157 ERR_PIC_PEER_DEP = 157,
143 158
144 /* insert new ones above this line */ 159 /* insert new ones above this line */
145 AFTER_LAST_ERR_CODE 160 AFTER_LAST_ERR_CODE
@@ -169,7 +184,7 @@ enum drbd_conns {
169 /* These temporal states are all used on the way 184 /* These temporal states are all used on the way
170 * from >= C_CONNECTED to Unconnected. 185 * from >= C_CONNECTED to Unconnected.
171 * The 'disconnect reason' states 186 * The 'disconnect reason' states
172 * I do not allow to change beween them. */ 187 * I do not allow to change between them. */
173 C_TIMEOUT, 188 C_TIMEOUT,
174 C_BROKEN_PIPE, 189 C_BROKEN_PIPE,
175 C_NETWORK_FAILURE, 190 C_NETWORK_FAILURE,
@@ -180,7 +195,7 @@ enum drbd_conns {
180 C_WF_REPORT_PARAMS, /* we have a socket */ 195 C_WF_REPORT_PARAMS, /* we have a socket */
181 C_CONNECTED, /* we have introduced each other */ 196 C_CONNECTED, /* we have introduced each other */
182 C_STARTING_SYNC_S, /* starting full sync by admin request. */ 197 C_STARTING_SYNC_S, /* starting full sync by admin request. */
183 C_STARTING_SYNC_T, /* stariing full sync by admin request. */ 198 C_STARTING_SYNC_T, /* starting full sync by admin request. */
184 C_WF_BITMAP_S, 199 C_WF_BITMAP_S,
185 C_WF_BITMAP_T, 200 C_WF_BITMAP_T,
186 C_WF_SYNC_UUID, 201 C_WF_SYNC_UUID,
@@ -193,6 +208,10 @@ enum drbd_conns {
193 C_VERIFY_T, 208 C_VERIFY_T,
194 C_PAUSED_SYNC_S, 209 C_PAUSED_SYNC_S,
195 C_PAUSED_SYNC_T, 210 C_PAUSED_SYNC_T,
211
212 C_AHEAD,
213 C_BEHIND,
214
196 C_MASK = 31 215 C_MASK = 31
197}; 216};
198 217
@@ -217,7 +236,7 @@ union drbd_state {
217 * pointed out by Maxim Uvarov q<muvarov@ru.mvista.com> 236 * pointed out by Maxim Uvarov q<muvarov@ru.mvista.com>
218 * even though we transmit as "cpu_to_be32(state)", 237 * even though we transmit as "cpu_to_be32(state)",
219 * the offsets of the bitfields still need to be swapped 238 * the offsets of the bitfields still need to be swapped
220 * on different endianess. 239 * on different endianness.
221 */ 240 */
222 struct { 241 struct {
223#if defined(__LITTLE_ENDIAN_BITFIELD) 242#if defined(__LITTLE_ENDIAN_BITFIELD)
@@ -226,13 +245,17 @@ union drbd_state {
226 unsigned conn:5 ; /* 17/32 cstates */ 245 unsigned conn:5 ; /* 17/32 cstates */
227 unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ 246 unsigned disk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
228 unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */ 247 unsigned pdsk:4 ; /* 8/16 from D_DISKLESS to D_UP_TO_DATE */
229 unsigned susp:1 ; /* 2/2 IO suspended no/yes */ 248 unsigned susp:1 ; /* 2/2 IO suspended no/yes (by user) */
230 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */ 249 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */
231 unsigned peer_isp:1 ; 250 unsigned peer_isp:1 ;
232 unsigned user_isp:1 ; 251 unsigned user_isp:1 ;
233 unsigned _pad:11; /* 0 unused */ 252 unsigned susp_nod:1 ; /* IO suspended because no data */
253 unsigned susp_fen:1 ; /* IO suspended because fence peer handler runs*/
254 unsigned _pad:9; /* 0 unused */
234#elif defined(__BIG_ENDIAN_BITFIELD) 255#elif defined(__BIG_ENDIAN_BITFIELD)
235 unsigned _pad:11; /* 0 unused */ 256 unsigned _pad:9;
257 unsigned susp_fen:1 ;
258 unsigned susp_nod:1 ;
236 unsigned user_isp:1 ; 259 unsigned user_isp:1 ;
237 unsigned peer_isp:1 ; 260 unsigned peer_isp:1 ;
238 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */ 261 unsigned aftr_isp:1 ; /* isp .. imposed sync pause */
@@ -243,13 +266,13 @@ union drbd_state {
243 unsigned peer:2 ; /* 3/4 primary/secondary/unknown */ 266 unsigned peer:2 ; /* 3/4 primary/secondary/unknown */
244 unsigned role:2 ; /* 3/4 primary/secondary/unknown */ 267 unsigned role:2 ; /* 3/4 primary/secondary/unknown */
245#else 268#else
246# error "this endianess is not supported" 269# error "this endianness is not supported"
247#endif 270#endif
248 }; 271 };
249 unsigned int i; 272 unsigned int i;
250}; 273};
251 274
252enum drbd_state_ret_codes { 275enum drbd_state_rv {
253 SS_CW_NO_NEED = 4, 276 SS_CW_NO_NEED = 4,
254 SS_CW_SUCCESS = 3, 277 SS_CW_SUCCESS = 3,
255 SS_NOTHING_TO_DO = 2, 278 SS_NOTHING_TO_DO = 2,
@@ -280,7 +303,7 @@ enum drbd_state_ret_codes {
280extern const char *drbd_conn_str(enum drbd_conns); 303extern const char *drbd_conn_str(enum drbd_conns);
281extern const char *drbd_role_str(enum drbd_role); 304extern const char *drbd_role_str(enum drbd_role);
282extern const char *drbd_disk_str(enum drbd_disk_state); 305extern const char *drbd_disk_str(enum drbd_disk_state);
283extern const char *drbd_set_st_err_str(enum drbd_state_ret_codes); 306extern const char *drbd_set_st_err_str(enum drbd_state_rv);
284 307
285#define SHARED_SECRET_MAX 64 308#define SHARED_SECRET_MAX 64
286 309
@@ -312,6 +335,8 @@ enum drbd_timeout_flag {
312 335
313#define DRBD_MAGIC 0x83740267 336#define DRBD_MAGIC 0x83740267
314#define BE_DRBD_MAGIC __constant_cpu_to_be32(DRBD_MAGIC) 337#define BE_DRBD_MAGIC __constant_cpu_to_be32(DRBD_MAGIC)
338#define DRBD_MAGIC_BIG 0x835a
339#define BE_DRBD_MAGIC_BIG __constant_cpu_to_be16(DRBD_MAGIC_BIG)
315 340
316/* these are of type "int" */ 341/* these are of type "int" */
317#define DRBD_MD_INDEX_INTERNAL -1 342#define DRBD_MD_INDEX_INTERNAL -1