Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
drbd.h File Reference
#include <linux/connector.h>
#include <asm/types.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <limits.h>

Go to the source code of this file.

Data Structures

union  drbd_state
 
struct  drbd_nl_cfg_req
 
struct  drbd_nl_cfg_reply
 

Macros

#define __LITTLE_ENDIAN_BITFIELD
 
#define REL_VERSION   "8.3.13"
 
#define API_VERSION   88
 
#define PRO_VERSION_MIN   86
 
#define PRO_VERSION_MAX   96
 
#define DRBD_PROT_A   1
 
#define DRBD_PROT_B   2
 
#define DRBD_PROT_C   3
 
#define SHARED_SECRET_MAX   64
 
#define MDF_CONSISTENT   (1 << 0)
 
#define MDF_PRIMARY_IND   (1 << 1)
 
#define MDF_CONNECTED_IND   (1 << 2)
 
#define MDF_FULL_SYNC   (1 << 3)
 
#define MDF_WAS_UP_TO_DATE   (1 << 4)
 
#define MDF_PEER_OUT_DATED   (1 << 5)
 
#define MDF_CRASHED_PRIMARY   (1 << 6)
 
#define UUID_JUST_CREATED   ((__u64)4)
 
#define DRBD_MAGIC   0x83740267
 
#define BE_DRBD_MAGIC   __constant_cpu_to_be32(DRBD_MAGIC)
 
#define DRBD_MAGIC_BIG   0x835a
 
#define BE_DRBD_MAGIC_BIG   __constant_cpu_to_be16(DRBD_MAGIC_BIG)
 
#define DRBD_MD_INDEX_INTERNAL   -1
 
#define DRBD_MD_INDEX_FLEX_EXT   -2
 
#define DRBD_MD_INDEX_FLEX_INT   -3
 
#define DRBD_NL_CREATE_DEVICE   0x01
 
#define DRBD_NL_SET_DEFAULTS   0x02
 
#define CN_IDX_STEP   6977
 

Enumerations

enum  drbd_io_error_p { EP_PASS_ON, EP_CALL_HELPER, EP_DETACH }
 
enum  drbd_fencing_p { FP_DONT_CARE, FP_RESOURCE, FP_STONITH }
 
enum  drbd_disconnect_p { DP_RECONNECT, DP_DROP_NET_CONF, DP_FREEZE_IO }
 
enum  drbd_after_sb_p {
  ASB_DISCONNECT, ASB_DISCARD_YOUNGER_PRI, ASB_DISCARD_OLDER_PRI, ASB_DISCARD_ZERO_CHG,
  ASB_DISCARD_LEAST_CHG, ASB_DISCARD_LOCAL, ASB_DISCARD_REMOTE, ASB_CONSENSUS,
  ASB_DISCARD_SECONDARY, ASB_CALL_HELPER, ASB_VIOLENTLY
}
 
enum  drbd_on_no_data { OND_IO_ERROR, OND_SUSPEND_IO }
 
enum  drbd_on_congestion { OC_BLOCK, OC_PULL_AHEAD, OC_DISCONNECT }
 
enum  drbd_ret_code {
  ERR_CODE_BASE = 100, NO_ERROR = 101, ERR_LOCAL_ADDR = 102, ERR_PEER_ADDR = 103,
  ERR_OPEN_DISK = 104, ERR_OPEN_MD_DISK = 105, ERR_DISK_NOT_BDEV = 107, ERR_MD_NOT_BDEV = 108,
  ERR_DISK_TOO_SMALL = 111, ERR_MD_DISK_TOO_SMALL = 112, ERR_BDCLAIM_DISK = 114, ERR_BDCLAIM_MD_DISK = 115,
  ERR_MD_IDX_INVALID = 116, ERR_IO_MD_DISK = 118, ERR_MD_INVALID = 119, ERR_AUTH_ALG = 120,
  ERR_AUTH_ALG_ND = 121, ERR_NOMEM = 122, ERR_DISCARD = 123, ERR_DISK_CONFIGURED = 124,
  ERR_NET_CONFIGURED = 125, ERR_MANDATORY_TAG = 126, ERR_MINOR_INVALID = 127, ERR_INTR = 129,
  ERR_RESIZE_RESYNC = 130, ERR_NO_PRIMARY = 131, ERR_SYNC_AFTER = 132, ERR_SYNC_AFTER_CYCLE = 133,
  ERR_PAUSE_IS_SET = 134, ERR_PAUSE_IS_CLEAR = 135, ERR_PACKET_NR = 137, ERR_NO_DISK = 138,
  ERR_NOT_PROTO_C = 139, ERR_NOMEM_BITMAP = 140, ERR_INTEGRITY_ALG = 141, ERR_INTEGRITY_ALG_ND = 142,
  ERR_CPU_MASK_PARSE = 143, ERR_CSUMS_ALG = 144, ERR_CSUMS_ALG_ND = 145, ERR_VERIFY_ALG = 146,
  ERR_VERIFY_ALG_ND = 147, ERR_CSUMS_RESYNC_RUNNING = 148, ERR_VERIFY_RUNNING = 149, ERR_DATA_NOT_CURRENT = 150,
  ERR_CONNECTED = 151, ERR_PERM = 152, ERR_NEED_APV_93 = 153, ERR_STONITH_AND_PROT_A = 154,
  ERR_CONG_NOT_PROTO_A = 155, ERR_PIC_AFTER_DEP = 156, ERR_PIC_PEER_DEP = 157, AFTER_LAST_ERR_CODE
}
 
enum  drbd_role { R_UNKNOWN = 0, R_PRIMARY = 1, R_SECONDARY = 2, R_MASK = 3 }
 
enum  drbd_conns {
  C_STANDALONE, C_DISCONNECTING, C_UNCONNECTED, C_TIMEOUT,
  C_BROKEN_PIPE, C_NETWORK_FAILURE, C_PROTOCOL_ERROR, C_TEAR_DOWN,
  C_WF_CONNECTION, C_WF_REPORT_PARAMS, C_CONNECTED, C_STARTING_SYNC_S,
  C_STARTING_SYNC_T, C_WF_BITMAP_S, C_WF_BITMAP_T, C_WF_SYNC_UUID,
  C_SYNC_SOURCE, C_SYNC_TARGET, C_VERIFY_S, C_VERIFY_T,
  C_PAUSED_SYNC_S, C_PAUSED_SYNC_T, C_AHEAD, C_BEHIND,
  C_MASK = 31
}
 
enum  drbd_disk_state {
  D_DISKLESS, D_ATTACHING, D_FAILED, D_NEGOTIATING,
  D_INCONSISTENT, D_OUTDATED, D_UNKNOWN, D_CONSISTENT,
  D_UP_TO_DATE, D_MASK = 15
}
 
enum  drbd_state_rv {
  SS_CW_NO_NEED = 4, SS_CW_SUCCESS = 3, SS_NOTHING_TO_DO = 2, SS_SUCCESS = 1,
  SS_UNKNOWN_ERROR = 0, SS_TWO_PRIMARIES = -1, SS_NO_UP_TO_DATE_DISK = -2, SS_NO_LOCAL_DISK = -4,
  SS_NO_REMOTE_DISK = -5, SS_CONNECTED_OUTDATES = -6, SS_PRIMARY_NOP = -7, SS_RESYNC_RUNNING = -8,
  SS_ALREADY_STANDALONE = -9, SS_CW_FAILED_BY_PEER = -10, SS_IS_DISKLESS = -11, SS_DEVICE_IN_USE = -12,
  SS_NO_NET_CONFIG = -13, SS_NO_VERIFY_ALG = -14, SS_NEED_CONNECTION = -15, SS_LOWER_THAN_OUTDATED = -16,
  SS_NOT_SUPPORTED = -17, SS_IN_TRANSIENT_STATE = -18, SS_CONCURRENT_ST_CHG = -19, SS_AFTER_LAST_ERROR = -20
}
 
enum  drbd_uuid_index {
  UI_CURRENT, UI_BITMAP, UI_HISTORY_START, UI_HISTORY_END,
  UI_SIZE, UI_FLAGS, UI_EXTENDED_SIZE
}
 
enum  drbd_timeout_flag { UT_DEFAULT = 0, UT_DEGRADED = 1, UT_PEER_OUTDATED = 2 }
 

Functions

const chardrbd_buildtag (void)
 
const chardrbd_conn_str (enum drbd_conns)
 
const chardrbd_role_str (enum drbd_role)
 
const chardrbd_disk_str (enum drbd_disk_state)
 
const chardrbd_set_st_err_str (enum drbd_state_rv)
 

Macro Definition Documentation

#define __LITTLE_ENDIAN_BITFIELD

Definition at line 45 of file drbd.h.

#define API_VERSION   88

Definition at line 57 of file drbd.h.

#define BE_DRBD_MAGIC   __constant_cpu_to_be32(DRBD_MAGIC)

Definition at line 337 of file drbd.h.

#define BE_DRBD_MAGIC_BIG   __constant_cpu_to_be16(DRBD_MAGIC_BIG)

Definition at line 339 of file drbd.h.

#define CN_IDX_STEP   6977

Definition at line 353 of file drbd.h.

#define DRBD_MAGIC   0x83740267

Definition at line 336 of file drbd.h.

#define DRBD_MAGIC_BIG   0x835a

Definition at line 338 of file drbd.h.

#define DRBD_MD_INDEX_FLEX_EXT   -2

Definition at line 343 of file drbd.h.

#define DRBD_MD_INDEX_FLEX_INT   -3

Definition at line 344 of file drbd.h.

#define DRBD_MD_INDEX_INTERNAL   -1

Definition at line 342 of file drbd.h.

#define DRBD_NL_CREATE_DEVICE   0x01

Definition at line 348 of file drbd.h.

#define DRBD_NL_SET_DEFAULTS   0x02

Definition at line 349 of file drbd.h.

#define DRBD_PROT_A   1

Definition at line 163 of file drbd.h.

#define DRBD_PROT_B   2

Definition at line 164 of file drbd.h.

#define DRBD_PROT_C   3

Definition at line 165 of file drbd.h.

#define MDF_CONNECTED_IND   (1 << 2)

Definition at line 312 of file drbd.h.

#define MDF_CONSISTENT   (1 << 0)

Definition at line 310 of file drbd.h.

#define MDF_CRASHED_PRIMARY   (1 << 6)

Definition at line 316 of file drbd.h.

#define MDF_FULL_SYNC   (1 << 3)

Definition at line 313 of file drbd.h.

#define MDF_PEER_OUT_DATED   (1 << 5)

Definition at line 315 of file drbd.h.

#define MDF_PRIMARY_IND   (1 << 1)

Definition at line 311 of file drbd.h.

#define MDF_WAS_UP_TO_DATE   (1 << 4)

Definition at line 314 of file drbd.h.

#define PRO_VERSION_MAX   96

Definition at line 59 of file drbd.h.

#define PRO_VERSION_MIN   86

Definition at line 58 of file drbd.h.

#define REL_VERSION   "8.3.13"

Definition at line 56 of file drbd.h.

#define SHARED_SECRET_MAX   64

Definition at line 308 of file drbd.h.

#define UUID_JUST_CREATED   ((__u64)4)

Definition at line 334 of file drbd.h.

Enumeration Type Documentation

Enumerator:
ASB_DISCONNECT 
ASB_DISCARD_YOUNGER_PRI 
ASB_DISCARD_OLDER_PRI 
ASB_DISCARD_ZERO_CHG 
ASB_DISCARD_LEAST_CHG 
ASB_DISCARD_LOCAL 
ASB_DISCARD_REMOTE 
ASB_CONSENSUS 
ASB_DISCARD_SECONDARY 
ASB_CALL_HELPER 
ASB_VIOLENTLY 

Definition at line 80 of file drbd.h.

enum drbd_conns
Enumerator:
C_STANDALONE 
C_DISCONNECTING 
C_UNCONNECTED 
C_TIMEOUT 
C_BROKEN_PIPE 
C_NETWORK_FAILURE 
C_PROTOCOL_ERROR 
C_TEAR_DOWN 
C_WF_CONNECTION 
C_WF_REPORT_PARAMS 
C_CONNECTED 
C_STARTING_SYNC_S 
C_STARTING_SYNC_T 
C_WF_BITMAP_S 
C_WF_BITMAP_T 
C_WF_SYNC_UUID 
C_SYNC_SOURCE 
C_SYNC_TARGET 
C_VERIFY_S 
C_VERIFY_T 
C_PAUSED_SYNC_S 
C_PAUSED_SYNC_T 
C_AHEAD 
C_BEHIND 
C_MASK 

Definition at line 179 of file drbd.h.

Enumerator:
DP_RECONNECT 
DP_DROP_NET_CONF 
DP_FREEZE_IO 

Definition at line 74 of file drbd.h.

Enumerator:
D_DISKLESS 
D_ATTACHING 
D_FAILED 
D_NEGOTIATING 
D_INCONSISTENT 
D_OUTDATED 
D_UNKNOWN 
D_CONSISTENT 
D_UP_TO_DATE 
D_MASK 

Definition at line 218 of file drbd.h.

Enumerator:
FP_DONT_CARE 
FP_RESOURCE 
FP_STONITH 

Definition at line 68 of file drbd.h.

Enumerator:
EP_PASS_ON 
EP_CALL_HELPER 
EP_DETACH 

Definition at line 62 of file drbd.h.

Enumerator:
OC_BLOCK 
OC_PULL_AHEAD 
OC_DISCONNECT 

Definition at line 99 of file drbd.h.

Enumerator:
OND_IO_ERROR 
OND_SUSPEND_IO 

Definition at line 94 of file drbd.h.

Enumerator:
ERR_CODE_BASE 
NO_ERROR 
ERR_LOCAL_ADDR 
ERR_PEER_ADDR 
ERR_OPEN_DISK 
ERR_OPEN_MD_DISK 
ERR_DISK_NOT_BDEV 
ERR_MD_NOT_BDEV 
ERR_DISK_TOO_SMALL 
ERR_MD_DISK_TOO_SMALL 
ERR_BDCLAIM_DISK 
ERR_BDCLAIM_MD_DISK 
ERR_MD_IDX_INVALID 
ERR_IO_MD_DISK 
ERR_MD_INVALID 
ERR_AUTH_ALG 
ERR_AUTH_ALG_ND 
ERR_NOMEM 
ERR_DISCARD 
ERR_DISK_CONFIGURED 
ERR_NET_CONFIGURED 
ERR_MANDATORY_TAG 
ERR_MINOR_INVALID 
ERR_INTR 
ERR_RESIZE_RESYNC 
ERR_NO_PRIMARY 
ERR_SYNC_AFTER 
ERR_SYNC_AFTER_CYCLE 
ERR_PAUSE_IS_SET 
ERR_PAUSE_IS_CLEAR 
ERR_PACKET_NR 
ERR_NO_DISK 
ERR_NOT_PROTO_C 
ERR_NOMEM_BITMAP 
ERR_INTEGRITY_ALG 
ERR_INTEGRITY_ALG_ND 
ERR_CPU_MASK_PARSE 
ERR_CSUMS_ALG 
ERR_CSUMS_ALG_ND 
ERR_VERIFY_ALG 
ERR_VERIFY_ALG_ND 
ERR_CSUMS_RESYNC_RUNNING 
ERR_VERIFY_RUNNING 
ERR_DATA_NOT_CURRENT 
ERR_CONNECTED 
ERR_PERM 
ERR_NEED_APV_93 
ERR_STONITH_AND_PROT_A 
ERR_CONG_NOT_PROTO_A 
ERR_PIC_AFTER_DEP 
ERR_PIC_PEER_DEP 
AFTER_LAST_ERR_CODE 

Definition at line 106 of file drbd.h.

enum drbd_role
Enumerator:
R_UNKNOWN 
R_PRIMARY 
R_SECONDARY 
R_MASK 

Definition at line 167 of file drbd.h.

Enumerator:
SS_CW_NO_NEED 
SS_CW_SUCCESS 
SS_NOTHING_TO_DO 
SS_SUCCESS 
SS_UNKNOWN_ERROR 
SS_TWO_PRIMARIES 
SS_NO_UP_TO_DATE_DISK 
SS_NO_LOCAL_DISK 
SS_NO_REMOTE_DISK 
SS_CONNECTED_OUTDATES 
SS_PRIMARY_NOP 
SS_RESYNC_RUNNING 
SS_ALREADY_STANDALONE 
SS_CW_FAILED_BY_PEER 
SS_IS_DISKLESS 
SS_DEVICE_IN_USE 
SS_NO_NET_CONFIG 
SS_NO_VERIFY_ALG 
SS_NEED_CONNECTION 
SS_LOWER_THAN_OUTDATED 
SS_NOT_SUPPORTED 
SS_IN_TRANSIENT_STATE 
SS_CONCURRENT_ST_CHG 
SS_AFTER_LAST_ERROR 

Definition at line 275 of file drbd.h.

Enumerator:
UT_DEFAULT 
UT_DEGRADED 
UT_PEER_OUTDATED 

Definition at line 328 of file drbd.h.

Enumerator:
UI_CURRENT 
UI_BITMAP 
UI_HISTORY_START 
UI_HISTORY_END 
UI_SIZE 
UI_FLAGS 
UI_EXTENDED_SIZE 

Definition at line 318 of file drbd.h.

Function Documentation

const char* drbd_buildtag ( void  )

Definition at line 4378 of file drbd_main.c.

const char* drbd_conn_str ( enum  drbd_conns)

Definition at line 94 of file drbd_strings.c.

const char* drbd_disk_str ( enum  drbd_disk_state)

Definition at line 105 of file drbd_strings.c.

const char* drbd_role_str ( enum  drbd_role)

Definition at line 100 of file drbd_strings.c.

const char* drbd_set_st_err_str ( enum  drbd_state_rv)

Definition at line 110 of file drbd_strings.c.