Motr  M0
cm.c File Reference
#include "lib/trace.h"
#include "lib/bob.h"
#include "lib/misc.h"
#include "lib/assert.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "lib/memory.h"
#include "module/instance.h"
#include "motr/magic.h"
#include "motr/setup.h"
#include "net/buffer_pool.h"
#include "rpc/rpclib.h"
#include "rpc/rpc_machine.h"
#include "reqh/reqh.h"
#include "fop/fop.h"
#include "pool/pool.h"
#include "conf/obj_ops.h"
#include "ha/ha.h"
#include "cm/cm.h"
#include "cm/ag.h"
#include "cm/cp.h"
#include "cm/proxy.h"
#include "cm/sw.h"
#include "cm/sw_xc.h"
#include "cm/cp_onwire_xc.h"
#include "cm/ag_xc.h"
Include dependency graph for cm.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CM
 

Functions

 M0_TL_DESCR_DEFINE (cmtypes, "copy machine types", static, struct m0_cm_type, ct_linkage, ct_magix, CM_TYPE_LINK_MAGIX, CM_TYPE_HEAD_MAGIX)
 
 M0_TL_DEFINE (cmtypes, static, struct m0_cm_type)
 
 M0_BOB_DEFINE (static, &cmtypes_bob, m0_cm_type)
 
M0_INTERNAL struct m0_cmm0_cmsvc2cm (struct m0_reqh_service *cmsvc)
 
M0_INTERNAL int m0_ha_cm_err_send (struct m0_cm *cm, int rc)
 
M0_INTERNAL void m0_cm_fail (struct m0_cm *cm, int rc)
 
M0_INTERNAL void m0_cm_lock (struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_unlock (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_trylock (struct m0_cm *cm)
 
M0_INTERNAL bool m0_cm_is_locked (const struct m0_cm *cm)
 
M0_INTERNAL enum m0_cm_state m0_cm_state_get (const struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_state_set (struct m0_cm *cm, enum m0_cm_state state)
 
static int cm_rc (struct m0_cm *cm)
 
M0_INTERNAL bool m0_cm_invariant (const struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_setup (struct m0_cm *cm)
 
static int cm_replicas_connect (struct m0_cm *cm, struct m0_rpc_machine *rmach, struct m0_reqh *reqh)
 
static void cm_replicas_destroy (struct m0_cm *cm)
 
static int cm_pre_start_cleanup (struct m0_cm *cm)
 
M0_INTERNAL struct m0_rpc_machinem0_cm_rpc_machine_find (struct m0_reqh *reqh)
 
M0_INTERNAL int m0_cm_prepare (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_ready (struct m0_cm *cm)
 
M0_INTERNAL bool m0_cm_is_ready (struct m0_cm *cm)
 
M0_INTERNAL bool m0_cm_is_active (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_start (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_proxies_fini (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_stop (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_module_init (void)
 
M0_INTERNAL void m0_cm_module_fini (void)
 
static uint64_t cm_id_generate (void)
 
M0_INTERNAL int m0_cm_init (struct m0_cm *cm, struct m0_cm_type *cm_type, const struct m0_cm_ops *cm_ops)
 
M0_INTERNAL void m0_cm_fini (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_type_register (struct m0_cm_type *cmtype)
 
M0_INTERNAL void m0_cm_type_deregister (struct m0_cm_type *cmtype)
 
M0_INTERNAL int m0_cm_data_next (struct m0_cm *cm, struct m0_cm_cp *cp)
 
M0_INTERNAL bool m0_cm_has_more_data (const struct m0_cm *cm)
 
M0_INTERNAL struct m0_net_bufferm0_cm_buffer_get (struct m0_net_buffer_pool *bp, uint64_t colour)
 
M0_INTERNAL void m0_cm_buffer_put (struct m0_net_buffer_pool *bp, struct m0_net_buffer *buf, uint64_t colour)
 
M0_INTERNAL void m0_cm_notify (struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_wait (struct m0_cm *cm, struct m0_fom *fom)
 
M0_INTERNAL void m0_cm_wait_cancel (struct m0_cm *cm, struct m0_fom *fom)
 
M0_INTERNAL int m0_cm_complete (struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_complete_notify (struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_proxies_init_wait (struct m0_cm *cm, struct m0_fom *fom)
 
M0_INTERNAL void m0_cm_frozen_ag_cleanup (struct m0_cm *cm, struct m0_cm_proxy *proxy)
 
M0_INTERNAL void m0_cm_proxy_failed_cleanup (struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_abort (struct m0_cm *cm, int rc)
 
M0_INTERNAL bool m0_cm_is_dirty (struct m0_cm *cm)
 
M0_INTERNAL bool m0_cm_proxies_updated (struct m0_cm *cm)
 
static void cm_ast_run_thread (struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_ast_run_thread_init (struct m0_cm *cm)
 
M0_INTERNAL void m0_cm_ast_run_thread_fini (struct m0_cm *cm)
 

Variables

static struct m0_tl cmtypes
 
static struct m0_mutex cmtypes_mutex
 
static struct m0_bob_type cmtypes_bob
 
static struct m0_sm_state_descr cm_state_descr [M0_CMS_NR]
 
static const struct m0_sm_conf cm_sm_conf
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CM

Definition at line 23 of file cm.c.