Motr  M0
entrypoint.c File Reference
#include "lib/trace.h"
#include "ha/entrypoint.h"
#include "ha/entrypoint_xc.h"
#include "lib/memory.h"
#include "lib/time.h"
#include "lib/mutex.h"
#include "lib/thread.h"
#include "fop/fom.h"
#include "fop/fop.h"
#include "fop/fom_generic.h"
#include "reqh/reqh_service.h"
#include "rpc/rpc.h"
#include "rpc/rpc_opcodes.h"
#include "motr/version.h"
Include dependency graph for entrypoint.c:

Go to the source code of this file.

Data Structures

struct  ha_entrypoint_service
 
struct  ha_entrypoint_server_fom
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 

Enumerations

enum  { ECL_TIMEOUT = 5, ECL_MAX_RPCS_IN_FLIGHT = 2 }
 
enum  { HEC_FOM_INIT = M0_FOM_PHASE_INIT, HEC_FOM_FINI = M0_FOM_PHASE_FINISH }
 

Functions

static struct ha_entrypoint_serviceha_entrypoint_service_container (struct m0_reqh_service *service)
 
static void ha_entrypoint_service_init (struct m0_reqh_service *service)
 
static void ha_entrypoint_service_fini (struct m0_reqh_service *service)
 
static int ha_entrypoint_service_start (struct m0_reqh_service *service)
 
static int ha_entrypoint_service_fop_accept (struct m0_reqh_service *service, struct m0_fop *fop)
 
static void ha_entrypoint_service_stop (struct m0_reqh_service *service)
 
static int ha_entrypoint_service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
M0_INTERNAL int m0_ha_entrypoint_service_init (struct m0_reqh_service **service, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_ha_entrypoint_service_fini (struct m0_reqh_service *he_service)
 
 M0_TL_DESCR_DEFINE (hes_req, "m0_ha_entrypoint_server::hes_requests", static, struct ha_entrypoint_server_fom, esf_tlink, esf_magic, 10, 11)
 
 M0_TL_DEFINE (hes_req, static, struct ha_entrypoint_server_fom)
 
M0_INTERNAL int m0_ha_entrypoint_server_init (struct m0_ha_entrypoint_server *hes, struct m0_ha_entrypoint_server_cfg *hes_cfg)
 
M0_INTERNAL void m0_ha_entrypoint_server_fini (struct m0_ha_entrypoint_server *hes)
 
M0_INTERNAL void m0_ha_entrypoint_server_start (struct m0_ha_entrypoint_server *hes)
 
M0_INTERNAL void m0_ha_entrypoint_server_stop (struct m0_ha_entrypoint_server *hes)
 
static struct ha_entrypoint_server_fomha_entrypoint_server_find (struct m0_ha_entrypoint_server *hes, const struct m0_uint128 *req_id)
 
static void ha_entrypoint_server_register (struct m0_ha_entrypoint_server *hes, struct ha_entrypoint_server_fom *server_fom)
 
static void ha_entrypoint_server_deregister (struct m0_ha_entrypoint_server *hes, struct ha_entrypoint_server_fom *server_fom)
 
M0_INTERNAL void m0_ha_entrypoint_server_reply (struct m0_ha_entrypoint_server *hes, const struct m0_uint128 *req_id, const struct m0_ha_entrypoint_rep *rep)
 
M0_INTERNAL const struct m0_ha_entrypoint_reqm0_ha_entrypoint_server_request_find (struct m0_ha_entrypoint_server *hes, const struct m0_uint128 *req_id)
 
static bool ha_entrypoint_client_rlink_cb (struct m0_clink *clink)
 
M0_INTERNAL int m0_ha_entrypoint_client_init (struct m0_ha_entrypoint_client *ecl, const char *ep, struct m0_ha_entrypoint_client_cfg *ecl_cfg)
 
M0_INTERNAL void m0_ha_entrypoint_client_fini (struct m0_ha_entrypoint_client *ecl)
 
static void ha_entrypoint_client_replied (struct m0_rpc_item *item)
 
static void ha_entrypoint_client_fop_release (struct m0_ref *ref)
 
static int ha_entrypoint_client_fom_tick (struct m0_fom *fom)
 
static void ha_entrypoint_client_fom_fini (struct m0_fom *fom)
 
static size_t ha_entrypoint_client_fom_locality (const struct m0_fom *fom)
 
M0_INTERNAL void m0_ha_entrypoint_client_request (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL void m0_ha_entrypoint_client_start (struct m0_ha_entrypoint_client *ecl)
 
static bool ha_entrypoint_client_start_check (struct m0_clink *clink)
 
static bool ha_entrypoint_client_stop_check (struct m0_clink *clink)
 
M0_INTERNAL void m0_ha_entrypoint_client_start_sync (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL void m0_ha_entrypoint_client_stop (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL struct m0_chanm0_ha_entrypoint_client_chan (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL enum m0_ha_entrypoint_client_state m0_ha_entrypoint_client_state_get (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL int m0_ha_entrypoint_mod_init (void)
 
M0_INTERNAL void m0_ha_entrypoint_mod_fini (void)
 
static size_t ha_entrypoint_home_locality (const struct m0_fom *fom)
 
static void ha_entrypoint_fom_fini (struct m0_fom *fom)
 
static int ha_entrypoint_get_fom_tick (struct m0_fom *fom)
 
static int ha_entrypoint_fom_create (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 

Variables

static const struct m0_reqh_service_ops ha_entrypoint_service_ops
 
static const struct m0_reqh_service_type_ops ha_entrypoint_stype_ops
 
struct m0_reqh_service_type m0_ha_entrypoint_service_type
 
static struct m0_sm_state_descr ha_entrypoint_server_fom_states []
 
struct m0_sm_conf m0_ha_entrypoint_server_fom_states_conf
 
static struct m0_sm_state_descr ha_entrypoint_client_states []
 
static struct m0_sm_conf ha_entrypoint_client_states_conf
 
static struct m0_sm_state_descr ha_entrypoint_client_fom_states []
 
static struct m0_sm_conf ha_entrypoint_client_fom_states_conf
 
static struct m0_rpc_item_ops ha_entrypoint_client_item_ops
 
static struct m0_fom_type ha_entrypoint_client_fom_type
 
static const struct m0_fom_type_ops ha_entrypoint_client_fom_type_ops
 
static const struct m0_fom_ops ha_entrypoint_client_fom_ops
 
const struct m0_fom_ops ha_entrypoint_get_fom_ops
 
const struct m0_fom_type_ops m0_ha_entrypoint_fom_type_ops