aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/drbd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/drbd.h')
-rw-r--r--include/linux/drbd.h81
1 files changed, 46 insertions, 35 deletions
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 47e3d4850584..0c5a18ec322c 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -51,12 +51,11 @@
51 51
52#endif 52#endif
53 53
54
55extern const char *drbd_buildtag(void); 54extern const char *drbd_buildtag(void);
56#define REL_VERSION "8.3.13" 55#define REL_VERSION "8.4.2"
57#define API_VERSION 88 56#define API_VERSION 1
58#define PRO_VERSION_MIN 86 57#define PRO_VERSION_MIN 86
59#define PRO_VERSION_MAX 96 58#define PRO_VERSION_MAX 101
60 59
61 60
62enum drbd_io_error_p { 61enum drbd_io_error_p {
@@ -66,7 +65,8 @@ enum drbd_io_error_p {
66}; 65};
67 66
68enum drbd_fencing_p { 67enum drbd_fencing_p {
69 FP_DONT_CARE, 68 FP_NOT_AVAIL = -1, /* Not a policy */
69 FP_DONT_CARE = 0,
70 FP_RESOURCE, 70 FP_RESOURCE,
71 FP_STONITH 71 FP_STONITH
72}; 72};
@@ -102,6 +102,20 @@ enum drbd_on_congestion {
102 OC_DISCONNECT, 102 OC_DISCONNECT,
103}; 103};
104 104
105enum drbd_read_balancing {
106 RB_PREFER_LOCAL,
107 RB_PREFER_REMOTE,
108 RB_ROUND_ROBIN,
109 RB_LEAST_PENDING,
110 RB_CONGESTED_REMOTE,
111 RB_32K_STRIPING,
112 RB_64K_STRIPING,
113 RB_128K_STRIPING,
114 RB_256K_STRIPING,
115 RB_512K_STRIPING,
116 RB_1M_STRIPING,
117};
118
105/* KEEP the order, do not delete or insert. Only append. */ 119/* KEEP the order, do not delete or insert. Only append. */
106enum drbd_ret_code { 120enum drbd_ret_code {
107 ERR_CODE_BASE = 100, 121 ERR_CODE_BASE = 100,
@@ -122,7 +136,7 @@ enum drbd_ret_code {
122 ERR_AUTH_ALG = 120, 136 ERR_AUTH_ALG = 120,
123 ERR_AUTH_ALG_ND = 121, 137 ERR_AUTH_ALG_ND = 121,
124 ERR_NOMEM = 122, 138 ERR_NOMEM = 122,
125 ERR_DISCARD = 123, 139 ERR_DISCARD_IMPOSSIBLE = 123,
126 ERR_DISK_CONFIGURED = 124, 140 ERR_DISK_CONFIGURED = 124,
127 ERR_NET_CONFIGURED = 125, 141 ERR_NET_CONFIGURED = 125,
128 ERR_MANDATORY_TAG = 126, 142 ERR_MANDATORY_TAG = 126,
@@ -130,8 +144,8 @@ enum drbd_ret_code {
130 ERR_INTR = 129, /* EINTR */ 144 ERR_INTR = 129, /* EINTR */
131 ERR_RESIZE_RESYNC = 130, 145 ERR_RESIZE_RESYNC = 130,
132 ERR_NO_PRIMARY = 131, 146 ERR_NO_PRIMARY = 131,
133 ERR_SYNC_AFTER = 132, 147 ERR_RESYNC_AFTER = 132,
134 ERR_SYNC_AFTER_CYCLE = 133, 148 ERR_RESYNC_AFTER_CYCLE = 133,
135 ERR_PAUSE_IS_SET = 134, 149 ERR_PAUSE_IS_SET = 134,
136 ERR_PAUSE_IS_CLEAR = 135, 150 ERR_PAUSE_IS_CLEAR = 135,
137 ERR_PACKET_NR = 137, 151 ERR_PACKET_NR = 137,
@@ -155,6 +169,14 @@ enum drbd_ret_code {
155 ERR_CONG_NOT_PROTO_A = 155, 169 ERR_CONG_NOT_PROTO_A = 155,
156 ERR_PIC_AFTER_DEP = 156, 170 ERR_PIC_AFTER_DEP = 156,
157 ERR_PIC_PEER_DEP = 157, 171 ERR_PIC_PEER_DEP = 157,
172 ERR_RES_NOT_KNOWN = 158,
173 ERR_RES_IN_USE = 159,
174 ERR_MINOR_CONFIGURED = 160,
175 ERR_MINOR_EXISTS = 161,
176 ERR_INVALID_REQUEST = 162,
177 ERR_NEED_APV_100 = 163,
178 ERR_NEED_ALLOW_TWO_PRI = 164,
179 ERR_MD_UNCLEAN = 165,
158 180
159 /* insert new ones above this line */ 181 /* insert new ones above this line */
160 AFTER_LAST_ERR_CODE 182 AFTER_LAST_ERR_CODE
@@ -296,7 +318,8 @@ enum drbd_state_rv {
296 SS_NOT_SUPPORTED = -17, /* drbd-8.2 only */ 318 SS_NOT_SUPPORTED = -17, /* drbd-8.2 only */
297 SS_IN_TRANSIENT_STATE = -18, /* Retry after the next state change */ 319 SS_IN_TRANSIENT_STATE = -18, /* Retry after the next state change */
298 SS_CONCURRENT_ST_CHG = -19, /* Concurrent cluster side state change! */ 320 SS_CONCURRENT_ST_CHG = -19, /* Concurrent cluster side state change! */
299 SS_AFTER_LAST_ERROR = -20, /* Keep this at bottom */ 321 SS_O_VOL_PEER_PRI = -20,
322 SS_AFTER_LAST_ERROR = -21, /* Keep this at bottom */
300}; 323};
301 324
302/* from drbd_strings.c */ 325/* from drbd_strings.c */
@@ -313,7 +336,9 @@ extern const char *drbd_set_st_err_str(enum drbd_state_rv);
313#define MDF_FULL_SYNC (1 << 3) 336#define MDF_FULL_SYNC (1 << 3)
314#define MDF_WAS_UP_TO_DATE (1 << 4) 337#define MDF_WAS_UP_TO_DATE (1 << 4)
315#define MDF_PEER_OUT_DATED (1 << 5) 338#define MDF_PEER_OUT_DATED (1 << 5)
316#define MDF_CRASHED_PRIMARY (1 << 6) 339#define MDF_CRASHED_PRIMARY (1 << 6)
340#define MDF_AL_CLEAN (1 << 7)
341#define MDF_AL_DISABLED (1 << 8)
317 342
318enum drbd_uuid_index { 343enum drbd_uuid_index {
319 UI_CURRENT, 344 UI_CURRENT,
@@ -333,37 +358,23 @@ enum drbd_timeout_flag {
333 358
334#define UUID_JUST_CREATED ((__u64)4) 359#define UUID_JUST_CREATED ((__u64)4)
335 360
361/* magic numbers used in meta data and network packets */
336#define DRBD_MAGIC 0x83740267 362#define DRBD_MAGIC 0x83740267
337#define BE_DRBD_MAGIC __constant_cpu_to_be32(DRBD_MAGIC)
338#define DRBD_MAGIC_BIG 0x835a 363#define DRBD_MAGIC_BIG 0x835a
339#define BE_DRBD_MAGIC_BIG __constant_cpu_to_be16(DRBD_MAGIC_BIG) 364#define DRBD_MAGIC_100 0x8620ec20
365
366#define DRBD_MD_MAGIC_07 (DRBD_MAGIC+3)
367#define DRBD_MD_MAGIC_08 (DRBD_MAGIC+4)
368#define DRBD_MD_MAGIC_84_UNCLEAN (DRBD_MAGIC+5)
369
370
371/* how I came up with this magic?
372 * base64 decode "actlog==" ;) */
373#define DRBD_AL_MAGIC 0x69cb65a2
340 374
341/* these are of type "int" */ 375/* these are of type "int" */
342#define DRBD_MD_INDEX_INTERNAL -1 376#define DRBD_MD_INDEX_INTERNAL -1
343#define DRBD_MD_INDEX_FLEX_EXT -2 377#define DRBD_MD_INDEX_FLEX_EXT -2
344#define DRBD_MD_INDEX_FLEX_INT -3 378#define DRBD_MD_INDEX_FLEX_INT -3
345 379
346/* Start of the new netlink/connector stuff */
347
348#define DRBD_NL_CREATE_DEVICE 0x01
349#define DRBD_NL_SET_DEFAULTS 0x02
350
351
352/* For searching a vacant cn_idx value */
353#define CN_IDX_STEP 6977
354
355struct drbd_nl_cfg_req {
356 int packet_type;
357 unsigned int drbd_minor;
358 int flags;
359 unsigned short tag_list[];
360};
361
362struct drbd_nl_cfg_reply {
363 int packet_type;
364 unsigned int minor;
365 int ret_code; /* enum ret_code or set_st_err_t */
366 unsigned short tag_list[]; /* only used with get_* calls */
367};
368
369#endif 380#endif