Motr  M0
copy machine proxy
Collaboration diagram for copy machine proxy:

Data Structures

struct  m0_cm_proxy
 
struct  m0_cm_proxy_in_count
 
struct  m0_cm_proxy_sw_onwire
 

Enumerations

enum  { PROXY_WAIT = 1 }
 
enum  m0_proxy_state {
  M0_PX_INIT, M0_PX_READY, M0_PX_ACTIVE, M0_PX_COMPLETE,
  M0_PX_STOP, M0_PX_FAILED
}
 

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)
 
 M0_TL_DESCR_DECLARE (proxy, M0_EXTERN)
 
 M0_TL_DECLARE (proxy, M0_INTERNAL, struct m0_cm_proxy)
 
 M0_TL_DESCR_DECLARE (proxy_fail, M0_EXTERN)
 
 M0_TL_DECLARE (proxy_fail, M0_INTERNAL, struct m0_cm_proxy)
 
 M0_TL_DESCR_DECLARE (proxy_cp, M0_EXTERN)
 
 M0_TL_DECLARE (proxy_cp, M0_INTERNAL, struct m0_cm_cp)
 

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
 

Detailed Description

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROXY_WAIT 

Definition at line 49 of file proxy.c.

◆ m0_proxy_state

Enumerator
M0_PX_INIT 
M0_PX_READY 
M0_PX_ACTIVE 
M0_PX_COMPLETE 
M0_PX_STOP 
M0_PX_FAILED 

Definition at line 48 of file proxy.h.

Function Documentation

◆ __wake_up_pending_cps()

static void __wake_up_pending_cps ( struct m0_cm_proxy pxy)
static

Definition at line 191 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _sw_update()

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

Updates sliding window with given [, ], latest outgoing aggregation group proccessed with and proxy status with .

Definition at line 236 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cm_proxy_cp_del()

static void cm_proxy_cp_del ( struct m0_cm_proxy pxy,
struct m0_cm_cp cp 
)
static

Definition at line 152 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cm_proxy_invariant()

static bool cm_proxy_invariant ( const struct m0_cm_proxy pxy)
static
Todo:
: Add checks for pxy::px_id when uid mechanism is implemented.

Definition at line 80 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cm_proxy_sw_onwire_post()

static void cm_proxy_sw_onwire_post ( struct m0_cm_proxy proxy,
struct m0_fop fop,
const struct m0_rpc_conn conn 
)
static

Definition at line 519 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ epoch_check()

static bool epoch_check ( struct m0_cm_proxy pxy,
m0_time_t  px_epoch 
)
static

Definition at line 203 of file proxy.c.

Here is the caller graph for this function:

◆ M0_BOB_DEFINE()

M0_BOB_DEFINE ( static  ,
proxy_bob,
m0_cm_proxy   
)

◆ m0_cm_proxies_ready()

M0_INTERNAL bool m0_cm_proxies_ready ( const struct m0_cm cm)

Definition at line 748 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxies_sent_reset()

M0_INTERNAL void m0_cm_proxies_sent_reset ( struct m0_cm cm)

Definition at line 780 of file proxy.c.

Here is the caller graph for this function:

◆ m0_cm_proxy_add()

M0_INTERNAL void m0_cm_proxy_add ( struct m0_cm cm,
struct m0_cm_proxy pxy 
)

Definition at line 110 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_agid_is_in_sw()

M0_INTERNAL bool m0_cm_proxy_agid_is_in_sw ( struct m0_cm_proxy pxy,
struct m0_cm_ag_id id 
)

Definition at line 650 of file proxy.c.

Here is the call graph for this function:

◆ m0_cm_proxy_cp_add()

M0_INTERNAL void m0_cm_proxy_cp_add ( struct m0_cm_proxy pxy,
struct m0_cm_cp cp 
)

Definition at line 139 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_del()

M0_INTERNAL void m0_cm_proxy_del ( struct m0_cm cm,
struct m0_cm_proxy pxy 
)

Definition at line 124 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_event_handle_register()

M0_INTERNAL void m0_cm_proxy_event_handle_register ( struct m0_cm_proxy pxy,
struct m0_conf_obj svc_obj 
)

Definition at line 726 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_fini()

M0_INTERNAL void m0_cm_proxy_fini ( struct m0_cm_proxy pxy)

Definition at line 627 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_in_count_alloc()

M0_INTERNAL int m0_cm_proxy_in_count_alloc ( struct m0_cm_proxy_in_count pcount,
uint32_t  nr_proxies 
)

Definition at line 758 of file proxy.c.

Here is the caller graph for this function:

◆ m0_cm_proxy_in_count_free()

M0_INTERNAL void m0_cm_proxy_in_count_free ( struct m0_cm_proxy_in_count pcount)

Definition at line 771 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_init()

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 
)

Definition at line 90 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_is_done()

M0_INTERNAL bool m0_cm_proxy_is_done ( const struct m0_cm_proxy pxy)

Definition at line 615 of file proxy.c.

Here is the caller graph for this function:

◆ m0_cm_proxy_is_locked()

M0_INTERNAL bool m0_cm_proxy_is_locked ( struct m0_cm_proxy pxy)

Definition at line 733 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_is_updated()

M0_INTERNAL bool m0_cm_proxy_is_updated ( struct m0_cm_proxy proxy,
struct m0_cm_sw in_interval 
)

Definition at line 390 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_locate()

M0_INTERNAL struct m0_cm_proxy * m0_cm_proxy_locate ( struct m0_cm cm,
const char *  addr 
)

Definition at line 161 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_lock()

M0_INTERNAL void m0_cm_proxy_lock ( struct m0_cm_proxy pxy)

Definition at line 738 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_nr()

M0_INTERNAL uint64_t m0_cm_proxy_nr ( struct m0_cm cm)

Definition at line 643 of file proxy.c.

Here is the call graph for this function:

◆ m0_cm_proxy_pending_cps_wakeup()

M0_INTERNAL void m0_cm_proxy_pending_cps_wakeup ( struct m0_cm cm)

Definition at line 663 of file proxy.c.

Here is the call graph for this function:

◆ m0_cm_proxy_remote_update()

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 
)

Definition at line 553 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_unlock()

M0_INTERNAL void m0_cm_proxy_unlock ( struct m0_cm_proxy pxy)

Definition at line 743 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_cm_proxy_update()

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 
)

Definition at line 327 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ M0_TL_DECLARE() [1/3]

M0_TL_DECLARE ( proxy  ,
M0_INTERNAL  ,
struct m0_cm_proxy   
)

◆ M0_TL_DECLARE() [2/3]

M0_TL_DECLARE ( proxy_fail  ,
M0_INTERNAL  ,
struct m0_cm_proxy   
)

◆ M0_TL_DECLARE() [3/3]

M0_TL_DECLARE ( proxy_cp  ,
M0_INTERNAL  ,
struct m0_cm_cp   
)

◆ M0_TL_DEFINE() [1/3]

M0_TL_DEFINE ( proxy  ,
M0_INTERNAL  ,
struct m0_cm_proxy   
)

◆ M0_TL_DEFINE() [2/3]

M0_TL_DEFINE ( proxy_fail  ,
M0_INTERNAL  ,
struct m0_cm_proxy   
)

◆ M0_TL_DEFINE() [3/3]

M0_TL_DEFINE ( proxy_cp  ,
M0_INTERNAL  ,
struct m0_cm_cp   
)

◆ M0_TL_DESCR_DECLARE() [1/3]

M0_TL_DESCR_DECLARE ( proxy  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DECLARE() [2/3]

M0_TL_DESCR_DECLARE ( proxy_fail  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DECLARE() [3/3]

M0_TL_DESCR_DECLARE ( proxy_cp  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DEFINE() [1/3]

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_DESCR_DEFINE() [2/3]

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_DESCR_DEFINE() [3/3]

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   
)

◆ proxy_clink_cb()

static bool proxy_clink_cb ( struct m0_clink clink)
static

Definition at line 703 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ proxy_done()

static void proxy_done ( struct m0_cm_proxy proxy)
static

Definition at line 217 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ proxy_sw_onwire_ast_cb()

static void proxy_sw_onwire_ast_cb ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 397 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ proxy_sw_onwire_item_replied_cb()

static void proxy_sw_onwire_item_replied_cb ( struct m0_rpc_item req_item)
static

Definition at line 483 of file proxy.c.

Here is the call graph for this function:

◆ proxy_sw_onwire_release()

static void proxy_sw_onwire_release ( struct m0_ref ref)
static

Definition at line 541 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ px_active()

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

Definition at line 281 of file proxy.c.

Here is the call graph for this function:

◆ px_complete()

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

Definition at line 295 of file proxy.c.

Here is the call graph for this function:

◆ px_fail_ast_cb()

static void px_fail_ast_cb ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 672 of file proxy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ px_online_ast_cb()

static void px_online_ast_cb ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 691 of file proxy.c.

Here is the caller graph for this function:

◆ px_ready()

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

Definition at line 251 of file proxy.c.

Here is the call graph for this function:

◆ px_stop_fail()

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 
)
static

Definition at line 305 of file proxy.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_XCA_DOMAIN

enum { ... } M0_XCA_DOMAIN

◆ proxy_bob

const struct m0_bob_type proxy_bob
static
Initial value:
= {
.bt_name = "cm proxy",
.bt_magix_offset = M0_MAGIX_OFFSET(struct m0_cm_proxy, px_magic),
.bt_magix = CM_PROXY_LINK_MAGIC,
.bt_check = NULL
}
#define NULL
Definition: misc.h:38
#define M0_MAGIX_OFFSET(type, field)
Definition: misc.h:356

Definition at line 71 of file proxy.c.

◆ proxy_sw_onwire_item_ops

const struct m0_rpc_item_ops proxy_sw_onwire_item_ops
Initial value:
= {
}
static void proxy_sw_onwire_item_replied_cb(struct m0_rpc_item *req_item)
Definition: proxy.c:483

Definition at line 515 of file proxy.c.

◆ px_action

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)
static
Initial value:
= {
}
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)
Definition: proxy.c:251
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)
Definition: proxy.c:281
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)
Definition: proxy.c:295
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)
Definition: proxy.c:305

Definition at line 317 of file proxy.c.