Motr  M0
proxy.c File Reference
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/trace.h"
#include "lib/time.h"
#include "lib/misc.h"
#include "lib/locality.h"
#include "rpc/rpc.h"
#include "rpc/session.h"
#include "motr/magic.h"
#include "motr/setup.h"
#include "fop/fom.h"
#include "cm/cm.h"
#include "cm/cp.h"
#include "cm/proxy.h"
#include "cm/ag.h"
Include dependency graph for proxy.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CM
 

Enumerations

enum  { PROXY_WAIT = 1 }
 

Functions

 M0_TL_DESCR_DEFINE (proxy, "copy machine proxy", M0_INTERNAL, struct m0_cm_proxy, px_linkage, px_magic, CM_PROXY_LINK_MAGIC, CM_PROXY_HEAD_MAGIC)
 
 M0_TL_DEFINE (proxy, M0_INTERNAL, struct m0_cm_proxy)
 
 M0_TL_DESCR_DEFINE (proxy_fail, "copy machine proxy", M0_INTERNAL, struct m0_cm_proxy, px_fail_linkage, px_magic, CM_PROXY_LINK_MAGIC, CM_PROXY_HEAD_MAGIC)
 
 M0_TL_DEFINE (proxy_fail, M0_INTERNAL, struct m0_cm_proxy)
 
 M0_TL_DESCR_DEFINE (proxy_cp, "pending copy packets", M0_INTERNAL, struct m0_cm_cp, c_cm_proxy_linkage, c_magix, CM_CP_MAGIX, CM_PROXY_CP_HEAD_MAGIX)
 
 M0_TL_DEFINE (proxy_cp, M0_INTERNAL, struct m0_cm_cp)
 
 M0_BOB_DEFINE (static, &proxy_bob, m0_cm_proxy)
 
static bool cm_proxy_invariant (const struct m0_cm_proxy *pxy)
 
M0_INTERNAL int m0_cm_proxy_init (struct m0_cm_proxy *proxy, uint64_t px_id, struct m0_cm_ag_id *lo, struct m0_cm_ag_id *hi, const char *endpoint)
 
M0_INTERNAL void m0_cm_proxy_add (struct m0_cm *cm, struct m0_cm_proxy *pxy)
 
M0_INTERNAL void m0_cm_proxy_del (struct m0_cm *cm, struct m0_cm_proxy *pxy)
 
M0_INTERNAL void m0_cm_proxy_cp_add (struct m0_cm_proxy *pxy, struct m0_cm_cp *cp)
 
static void cm_proxy_cp_del (struct m0_cm_proxy *pxy, struct m0_cm_cp *cp)
 
M0_INTERNAL struct m0_cm_proxym0_cm_proxy_locate (struct m0_cm *cm, const char *addr)
 
static void __wake_up_pending_cps (struct m0_cm_proxy *pxy)
 
static bool epoch_check (struct m0_cm_proxy *pxy, m0_time_t px_epoch)
 
static void proxy_done (struct m0_cm_proxy *proxy)
 
static void _sw_update (struct m0_cm_proxy *pxy, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval, uint32_t px_status)
 
static int px_ready (struct m0_cm_proxy *p, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval, m0_time_t px_epoch, uint32_t px_status)
 
static int px_active (struct m0_cm_proxy *p, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval, m0_time_t px_epoch, uint32_t px_status)
 
static int px_complete (struct m0_cm_proxy *p, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval, m0_time_t px_epoch, uint32_t px_status)
 
static int px_stop_fail (struct m0_cm_proxy *p, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval, m0_time_t px_epoch, uint32_t px_status)
 
M0_INTERNAL int m0_cm_proxy_update (struct m0_cm_proxy *pxy, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval, uint32_t px_status, m0_time_t px_epoch)
 
M0_INTERNAL bool m0_cm_proxy_is_updated (struct m0_cm_proxy *proxy, struct m0_cm_sw *in_interval)
 
static void proxy_sw_onwire_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void proxy_sw_onwire_item_replied_cb (struct m0_rpc_item *req_item)
 
static void cm_proxy_sw_onwire_post (struct m0_cm_proxy *proxy, struct m0_fop *fop, const struct m0_rpc_conn *conn)
 
static void proxy_sw_onwire_release (struct m0_ref *ref)
 
M0_INTERNAL int m0_cm_proxy_remote_update (struct m0_cm_proxy *proxy, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval)
 
M0_INTERNAL bool m0_cm_proxy_is_done (const struct m0_cm_proxy *pxy)
 
M0_INTERNAL void m0_cm_proxy_fini (struct m0_cm_proxy *pxy)
 
M0_INTERNAL uint64_t m0_cm_proxy_nr (struct m0_cm *cm)
 
M0_INTERNAL bool m0_cm_proxy_agid_is_in_sw (struct m0_cm_proxy *pxy, struct m0_cm_ag_id *id)
 
M0_INTERNAL void m0_cm_proxy_pending_cps_wakeup (struct m0_cm *cm)
 
static void px_fail_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void px_online_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool proxy_clink_cb (struct m0_clink *clink)
 
M0_INTERNAL void m0_cm_proxy_event_handle_register (struct m0_cm_proxy *pxy, struct m0_conf_obj *svc_obj)
 
M0_INTERNAL bool m0_cm_proxy_is_locked (struct m0_cm_proxy *pxy)
 
M0_INTERNAL void m0_cm_proxy_lock (struct m0_cm_proxy *pxy)
 
M0_INTERNAL void m0_cm_proxy_unlock (struct m0_cm_proxy *pxy)
 
M0_INTERNAL bool m0_cm_proxies_ready (const struct m0_cm *cm)
 
M0_INTERNAL int m0_cm_proxy_in_count_alloc (struct m0_cm_proxy_in_count *pcount, uint32_t nr_proxies)
 
M0_INTERNAL void m0_cm_proxy_in_count_free (struct m0_cm_proxy_in_count *pcount)
 
M0_INTERNAL void m0_cm_proxies_sent_reset (struct m0_cm *cm)
 

Variables

enum { ... }  M0_XCA_DOMAIN
 
static const struct m0_bob_type proxy_bob
 
static int(* px_action [])(struct m0_cm_proxy *px, struct m0_cm_sw *in_interval, struct m0_cm_sw *out_interval, m0_time_t px_epoch, uint32_t px_status)
 
const struct m0_rpc_item_ops proxy_sw_onwire_item_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CM

Definition at line 23 of file proxy.c.