Motr  M0
m0_cm_ops Struct Reference

#include <cm.h>

Collaboration diagram for m0_cm_ops:
Collaboration graph

Data Fields

int(* cmo_setup )(struct m0_cm *cm)
 
int(* cmo_prepare )(struct m0_cm *cm)
 
int(* cmo_start )(struct m0_cm *cm)
 
void(* cmo_stop )(struct m0_cm *cm)
 
int(* cmo_ag_alloc )(struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, struct m0_cm_aggr_group **out)
 
struct m0_cm_cp *(* cmo_cp_alloc )(struct m0_cm *cm)
 
int(* cmo_data_next )(struct m0_cm *cm, struct m0_cm_cp *cp)
 
int(* cmo_ag_next )(struct m0_cm *cm, const struct m0_cm_ag_id *id_curr, struct m0_cm_ag_id *id_next)
 
int(* cmo_get_space_for )(struct m0_cm *cm, const struct m0_cm_ag_id *id, size_t *count)
 
int(* cmo_sw_onwire_fop_setup )(struct m0_cm *cm, struct m0_fop *fop, void(*fop_release)(struct m0_ref *), uint64_t proxy_id, const char *local_ep, const struct m0_cm_sw *sw, const struct m0_cm_sw *out_interval)
 
bool(* cmo_is_peer )(struct m0_cm *cm, struct m0_reqh_service_ctx *ctx)
 
void(* cmo_ha_msg )(struct m0_cm *cm, struct m0_ha_msg *msg, int rc)
 
void(* cmo_fini )(struct m0_cm *cm)
 

Detailed Description

Operations supported by a copy machine.

Definition at line 286 of file cm.h.

Field Documentation

◆ cmo_ag_alloc

int(* cmo_ag_alloc) (struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, struct m0_cm_aggr_group **out)

Definition at line 306 of file cm.h.

◆ cmo_ag_next

int(* cmo_ag_next) (struct m0_cm *cm, const struct m0_cm_ag_id *id_curr, struct m0_cm_ag_id *id_next)

Calculates next relevant aggregation group id and returns it in the "id_next".

Definition at line 324 of file cm.h.

◆ cmo_cp_alloc

struct m0_cm_cp*(* cmo_cp_alloc) (struct m0_cm *cm)

Creates copy packets only if resources permit.

Definition at line 310 of file cm.h.

◆ cmo_data_next

int(* cmo_data_next) (struct m0_cm *cm, struct m0_cm_cp *cp)

Iterates over the copy machine data set and populates the copy packet with meta data of next data object to be restructured, i.e. fid, aggregation group, &c. Also attaches data buffer to m0_cm_cp::c_data, if successful.

Definition at line 318 of file cm.h.

◆ cmo_fini

void(* cmo_fini) (struct m0_cm *cm)

Copy machine specific finalisation routine.

Definition at line 360 of file cm.h.

◆ cmo_get_space_for

int(* cmo_get_space_for) (struct m0_cm *cm, const struct m0_cm_ag_id *id, size_t *count)

Returns required numbers in if copy machine has enough buffers for all the incoming copy packets.

Return values
0on success
-ENOSPCon failure

Definition at line 335 of file cm.h.

◆ cmo_ha_msg

void(* cmo_ha_msg) (struct m0_cm *cm, struct m0_ha_msg *msg, int rc)

Populates ha msg specific to cm

Definition at line 356 of file cm.h.

◆ cmo_is_peer

bool(* cmo_is_peer) (struct m0_cm *cm, struct m0_reqh_service_ctx *ctx)

Returns true if remote replica identified by 'ctx' participates in data restructure process, in which local 'cm' is also involved. Usually, if remote replica is involved in the same data restructure process, then local cm establishes connection to it.

Definition at line 353 of file cm.h.

◆ cmo_prepare

int(* cmo_prepare) (struct m0_cm *cm)

Definition at line 294 of file cm.h.

◆ cmo_setup

int(* cmo_setup) (struct m0_cm *cm)

Initialises copy machine specific data structures. This is invoked from generic m0_cm_setup() routine. Once the copy machine is setup successfully it transitions into M0_CMS_IDLE state.

Definition at line 292 of file cm.h.

◆ cmo_start

int(* cmo_start) (struct m0_cm *cm)

Starts copy machine operation. Acquires copy machine specific resources, broadcasts READY FOPs and starts copy machine operation based on the TRIGGER event.

Definition at line 301 of file cm.h.

◆ cmo_stop

void(* cmo_stop) (struct m0_cm *cm)

Invoked from m0_cm_stop().

Definition at line 304 of file cm.h.

◆ cmo_sw_onwire_fop_setup

int(* cmo_sw_onwire_fop_setup) (struct m0_cm *cm, struct m0_fop *fop, void(*fop_release)(struct m0_ref *), uint64_t proxy_id, const char *local_ep, const struct m0_cm_sw *sw, const struct m0_cm_sw *out_interval)

Initialises the given fop with copy machine specific sliding window update fop type and given information.

Definition at line 342 of file cm.h.


The documentation for this struct was generated from the following file: