Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
heartbeat.h File Reference
#include "ocfs2_heartbeat.h"

Go to the source code of this file.

Data Structures

struct  o2hb_callback_func
 

Macros

#define O2HB_REGION_TIMEOUT_MS   2000
 
#define O2HB_MAX_REGION_NAME_LEN   32
 
#define O2HB_LIVE_THRESHOLD   2
 
#define O2HB_DEFAULT_DEAD_THRESHOLD   31
 
#define O2HB_MIN_DEAD_THRESHOLD   2
 
#define O2HB_MAX_WRITE_TIMEOUT_MS   (O2HB_REGION_TIMEOUT_MS * (o2hb_dead_threshold - 1))
 
#define O2HB_CB_MAGIC   0x51d1e4ec
 

Typedefs

typedef voido2hb_cb_func )(struct o2nm_node *, int, void *)
 

Enumerations

enum  o2hb_callback_type { O2HB_NODE_DOWN_CB = 0, O2HB_NODE_UP_CB, O2HB_NUM_CB }
 

Functions

struct config_groupo2hb_alloc_hb_set (void)
 
void o2hb_free_hb_set (struct config_group *group)
 
void o2hb_setup_callback (struct o2hb_callback_func *hc, enum o2hb_callback_type type, o2hb_cb_func *func, void *data, int priority)
 
int o2hb_register_callback (const char *region_uuid, struct o2hb_callback_func *hc)
 
void o2hb_unregister_callback (const char *region_uuid, struct o2hb_callback_func *hc)
 
void o2hb_fill_node_map (unsigned long *map, unsigned bytes)
 
void o2hb_exit (void)
 
int o2hb_init (void)
 
int o2hb_check_node_heartbeating (u8 node_num)
 
int o2hb_check_node_heartbeating_from_callback (u8 node_num)
 
int o2hb_check_local_node_heartbeating (void)
 
void o2hb_stop_all_regions (void)
 
int o2hb_get_all_regions (char *region_uuids, u8 numregions)
 
int o2hb_global_heartbeat_active (void)
 

Variables

unsigned int o2hb_dead_threshold
 

Macro Definition Documentation

#define O2HB_CB_MAGIC   0x51d1e4ec

Definition at line 45 of file heartbeat.h.

#define O2HB_DEFAULT_DEAD_THRESHOLD   31

Definition at line 40 of file heartbeat.h.

#define O2HB_LIVE_THRESHOLD   2

Definition at line 37 of file heartbeat.h.

#define O2HB_MAX_REGION_NAME_LEN   32

Definition at line 34 of file heartbeat.h.

#define O2HB_MAX_WRITE_TIMEOUT_MS   (O2HB_REGION_TIMEOUT_MS * (o2hb_dead_threshold - 1))

Definition at line 43 of file heartbeat.h.

#define O2HB_MIN_DEAD_THRESHOLD   2

Definition at line 42 of file heartbeat.h.

#define O2HB_REGION_TIMEOUT_MS   2000

Definition at line 32 of file heartbeat.h.

Typedef Documentation

typedef void( o2hb_cb_func)(struct o2nm_node *, int, void *)

Definition at line 55 of file heartbeat.h.

Enumeration Type Documentation

Enumerator:
O2HB_NODE_DOWN_CB 
O2HB_NODE_UP_CB 
O2HB_NUM_CB 

Definition at line 48 of file heartbeat.h.

Function Documentation

struct config_group* o2hb_alloc_hb_set ( void  )
read

Definition at line 2328 of file heartbeat.c.

int o2hb_check_local_node_heartbeating ( void  )

Definition at line 2615 of file heartbeat.c.

int o2hb_check_node_heartbeating ( u8  node_num)

Definition at line 2581 of file heartbeat.c.

int o2hb_check_node_heartbeating_from_callback ( u8  node_num)

Definition at line 2597 of file heartbeat.c.

void o2hb_exit ( void  )

Definition at line 1304 of file heartbeat.c.

void o2hb_fill_node_map ( unsigned long map,
unsigned  bytes 
)

Definition at line 1441 of file heartbeat.c.

void o2hb_free_hb_set ( struct config_group group)

Definition at line 2347 of file heartbeat.c.

int o2hb_get_all_regions ( char region_uuids,
u8  numregions 
)

Definition at line 2649 of file heartbeat.c.

int o2hb_global_heartbeat_active ( void  )

Definition at line 2674 of file heartbeat.c.

int o2hb_init ( void  )

Definition at line 1406 of file heartbeat.c.

int o2hb_register_callback ( const char region_uuid,
struct o2hb_callback_func hc 
)

Definition at line 2512 of file heartbeat.c.

void o2hb_setup_callback ( struct o2hb_callback_func hc,
enum o2hb_callback_type  type,
o2hb_cb_func func,
void data,
int  priority 
)

Definition at line 2363 of file heartbeat.c.

void o2hb_stop_all_regions ( void  )

Definition at line 2634 of file heartbeat.c.

void o2hb_unregister_callback ( const char region_uuid,
struct o2hb_callback_func hc 
)

Definition at line 2558 of file heartbeat.c.

Variable Documentation

unsigned int o2hb_dead_threshold

Definition at line 134 of file heartbeat.c.