Motr  M0
ha.c File Reference
#include "lib/trace.h"
#include "motr/ha.h"
#include "lib/string.h"
#include "lib/memory.h"
#include "lib/assert.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "conf/helpers.h"
#include "conf/schema.h"
#include "conf/obj.h"
#include "conf/diter.h"
#include "conf/confc.h"
#include "fid/fid.h"
#include "module/instance.h"
#include "reqh/reqh.h"
#include "ha/entrypoint_fops.h"
#include "ha/note.h"
#include "ha/failvec.h"
Include dependency graph for ha.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 

Enumerations

enum  motr_ha_level {
  MOTR_HA_LEVEL_HA_INIT, MOTR_HA_LEVEL_DISPATCHER, MOTR_HA_LEVEL_INITIALISED, MOTR_HA_LEVEL_HA_START,
  MOTR_HA_LEVEL_INSTANCE_SET_HA, MOTR_HA_LEVEL_STARTED, MOTR_HA_LEVEL_CONNECT, MOTR_HA_LEVEL_INSTANCE_SET_HA_LINK,
  MOTR_HA_LEVEL_CONNECTED
}
 

Functions

M0_INTERNAL void m0_motr_ha_cfg_make (struct m0_motr_ha_cfg *mha_cfg, struct m0_reqh *reqh, struct m0_rpc_machine *rmach, const char *addr)
 
static bool motr_ha_service_filter (const struct m0_conf_obj *obj)
 
static int confd_count (const struct m0_conf_service *service, struct m0_ha_entrypoint_rep *rep, uint32_t index)
 
static int confd_fill (const struct m0_conf_service *service, struct m0_ha_entrypoint_rep *rep, uint32_t index)
 
static int motr_ha_confd_iter (struct m0_confc *confc, struct m0_ha_entrypoint_rep *rep, int(*confd_iter)(const struct m0_conf_service *, struct m0_ha_entrypoint_rep *, uint32_t))
 
static void motr_ha_entrypoint_rep_confds_free (struct m0_ha_entrypoint_rep *rep)
 
static int motr_ha_entrypoint_rep_confds_fill (struct m0_confc *confc, struct m0_ha_entrypoint_rep *rep)
 
static bool motr_ha_online_service_filter (const struct m0_conf_obj *obj)
 
static int motr_ha_entrypoint_rep_rm_fill (struct m0_confc *confc, struct m0_fid *active_rm_fid, char **active_rm_ep)
 
M0_INTERNAL struct m0_confcm0_ha_entrypoint_confc_override (void)
 
static void motr_ha_entrypoint_request_cb (struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
 
static void motr_ha_entrypoint_replied_cb (struct m0_ha *ha, struct m0_ha_entrypoint_rep *hep)
 
static void motr_ha_msg_received_cb (struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag)
 
static void motr_ha_msg_is_delivered_cb (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void motr_ha_msg_is_not_delivered_cb (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void motr_ha_link_connected_cb (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void motr_ha_link_reused_cb (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void motr_ha_link_absent_cb (struct m0_ha *ha, const struct m0_uint128 *req_id)
 
static void motr_ha_link_is_disconnecting_cb (struct m0_ha *ha, struct m0_ha_link *hl)
 
static void motr_ha_link_disconnected_cb (struct m0_ha *ha, struct m0_ha_link *hl)
 
static int motr_ha_level_enter (struct m0_module *module)
 
static void motr_ha_level_leave (struct m0_module *module)
 
M0_INTERNAL int m0_motr_ha_init (struct m0_motr_ha *mha, struct m0_motr_ha_cfg *mha_cfg)
 
M0_INTERNAL void m0_motr_ha_fini (struct m0_motr_ha *mha)
 
M0_INTERNAL int m0_motr_ha_start (struct m0_motr_ha *mha)
 
M0_INTERNAL void m0_motr_ha_stop (struct m0_motr_ha *mha)
 
M0_INTERNAL void m0_motr_ha_connect (struct m0_motr_ha *mha)
 
M0_INTERNAL void m0_motr_ha_disconnect (struct m0_motr_ha *mha)
 

Variables

const struct m0_ha_ops m0_motr_ha_ops
 
static const struct m0_modlev motr_ha_levels []