Motr  M0
Repair/re-balance sliding window

Data Structures

struct  m0_cm_repreb_sw
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_XXX
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_XCODE
 
#define _TI(x)
 
#define _EN(x)
 
#define _FI(x)
 
#define _FF(x)
 
#define _XT(x)   M0_EXTERN struct m0_xcode_type *x;
 
#define _XT(x)   &x,
 

Enumerations

enum  m0_cm_op {
  CM_OP_INVALID = 0, CM_OP_REPAIR, CM_OP_REBALANCE, CM_OP_REPAIR_QUIESCE,
  CM_OP_REBALANCE_QUIESCE, CM_OP_REPAIR_RESUME, CM_OP_REBALANCE_RESUME, CM_OP_REPAIR_STATUS,
  CM_OP_REBALANCE_STATUS, CM_OP_REPAIR_ABORT, CM_OP_REBALANCE_ABORT
}
 
enum  m0_cm_status {
  CM_STATUS_INVALID = 0, CM_STATUS_IDLE = 1, CM_STATUS_STARTED = 2, CM_STATUS_FAILED = 3,
  CM_STATUS_PAUSED = 4, CM_STATUS_NR
}
 
enum  cm_repreb_sw_phases { SWOPH_START = M0_FOM_PHASE_INIT, SWOPH_FINI = M0_FOM_PHASE_FINISH }
 

Functions

static int repreb_sw_fom_tick (struct m0_fom *fom)
 
static void repreb_sw_fom_fini (struct m0_fom *fom)
 
static size_t repreb_sw_fom_home_locality (const struct m0_fom *fom)
 
M0_INTERNAL int m0_cm_repreb_sw_onwire_fom_create (struct m0_fop *fop, struct m0_fop *r_fop, struct m0_fom **out, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_cm_repreb_sw_onwire_fop_init (struct m0_fop_type *ft, const struct m0_fom_type_ops *fomt_ops, enum M0_RPC_OPCODES op, const char *name, const struct m0_xcode_type *xt, uint64_t rpc_flags, struct m0_cm_type *cmt)
 
M0_INTERNAL void m0_cm_repreb_sw_onwire_fop_fini (struct m0_fop_type *ft)
 
M0_INTERNAL int m0_cm_repreb_sw_onwire_fop_setup (struct m0_cm *cm, struct m0_fop_type *ft, 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)
 
struct m0_cm_repreb_sw M0_XCA_DOMAIN (rpc)
 
M0_INTERNAL int m0_dtm0_pruner_init (struct m0_dtm0_pruner *dpn, struct m0_dtm0_pruner_cfg *dpn_cfg)
 
M0_INTERNAL void m0_dtm0_pruner_fini (struct m0_dtm0_pruner *dpn)
 
M0_INTERNAL void m0_dtm0_pruner_start (struct m0_dtm0_pruner *dpn)
 
M0_INTERNAL void m0_dtm0_pruner_stop (struct m0_dtm0_pruner *dpn)
 
static void field_print (const struct m0_xcode_field *f, int i)
 
static void type_print (const struct m0_xcode_type *xt)
 
static void protocol_print (int dom)
 
static int cmp (const void *p0, const void *p1)
 
void usage_print (const char *progname)
 
int main (int argc, char **argv)
 

Variables

static struct m0_sm_state_descr repreb_sw_fom_phases []
 
const struct m0_sm_conf m0_cm_repreb_sw_onwire_conf
 
static const struct m0_fom_ops repreb_sw_fom_ops
 
const struct m0_sm_conf m0_cm_repreb_sw_onwire_conf
 
struct m0_fop_type m0_cm_repreb_sw_fopt
 
static struct m0_xcode_type ** xt []
 
static const char * xcode_domain_name = "all"
 
void(* m0_sm__conf_init )(const struct m0_sm_conf *conf)
 

Detailed Description

Macro Definition Documentation

◆ _EN

#define _EN (   x)

Definition at line 53 of file protocol.c.

◆ _FF

#define _FF (   x)

Definition at line 55 of file protocol.c.

◆ _FI

#define _FI (   x)

Definition at line 54 of file protocol.c.

◆ _TI

#define _TI (   x)

Definition at line 52 of file protocol.c.

◆ _XT [1/2]

#define _XT (   x)    M0_EXTERN struct m0_xcode_type *x;

Definition at line 57 of file protocol.c.

◆ _XT [2/2]

#define _XT (   x)    &x,

Definition at line 57 of file protocol.c.

◆ M0_TRACE_SUBSYSTEM [1/2]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_XXX

Definition at line 28 of file pruner.c.

◆ M0_TRACE_SUBSYSTEM [2/2]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_XCODE

Definition at line 30 of file protocol.c.

Enumeration Type Documentation

◆ cm_repreb_sw_phases

Enumerator
SWOPH_START 
SWOPH_FINI 

Definition at line 34 of file sw_onwire_fom.h.

◆ m0_cm_op

enum m0_cm_op

Operation that copy machine is carrying out.

Enumerator
CM_OP_INVALID 
CM_OP_REPAIR 
CM_OP_REBALANCE 
CM_OP_REPAIR_QUIESCE 
CM_OP_REBALANCE_QUIESCE 
CM_OP_REPAIR_RESUME 
CM_OP_REBALANCE_RESUME 
CM_OP_REPAIR_STATUS 
CM_OP_REBALANCE_STATUS 
CM_OP_REPAIR_ABORT 
CM_OP_REBALANCE_ABORT 

Definition at line 37 of file cm.h.

◆ m0_cm_status

Repair/re-balance copy machine status

Enumerator
CM_STATUS_INVALID 
CM_STATUS_IDLE 
CM_STATUS_STARTED 
CM_STATUS_FAILED 
CM_STATUS_PAUSED 
CM_STATUS_NR 

Definition at line 54 of file cm.h.

Function Documentation

◆ cmp()

static int cmp ( const void *  p0,
const void *  p1 
)
static

Definition at line 123 of file protocol.c.

Here is the caller graph for this function:

◆ field_print()

static void field_print ( const struct m0_xcode_field f,
int  i 
)
static

Definition at line 131 of file protocol.c.

Here is the caller graph for this function:

◆ m0_cm_repreb_sw_onwire_fom_create()

M0_INTERNAL int m0_cm_repreb_sw_onwire_fom_create ( struct m0_fop fop,
struct m0_fop r_fop,
struct m0_fom **  out,
struct m0_reqh reqh 
)

Definition at line 141 of file sw_onwire_fom.c.

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

◆ m0_cm_repreb_sw_onwire_fop_fini()

M0_INTERNAL void m0_cm_repreb_sw_onwire_fop_fini ( struct m0_fop_type ft)

Finalises sliding window FOP type.

Definition at line 64 of file sw_onwire_fop.c.

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

◆ m0_cm_repreb_sw_onwire_fop_init()

M0_INTERNAL void m0_cm_repreb_sw_onwire_fop_init ( struct m0_fop_type ft,
const struct m0_fom_type_ops fomt_ops,
enum M0_RPC_OPCODES  op,
const char *  name,
const struct m0_xcode_type xt,
uint64_t  rpc_flags,
struct m0_cm_type cmt 
)

Initialises sliding window FOP type.

Definition at line 46 of file sw_onwire_fop.c.

Here is the caller graph for this function:

◆ m0_cm_repreb_sw_onwire_fop_setup()

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

Allocates sliding window FOP data and initialises sliding window FOP.

See also
m0_cm_sw_onwire_init()

Definition at line 70 of file sw_onwire_fop.c.

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

◆ m0_dtm0_pruner_fini()

M0_INTERNAL void m0_dtm0_pruner_fini ( struct m0_dtm0_pruner dpn)

Definition at line 39 of file pruner.c.

Here is the caller graph for this function:

◆ m0_dtm0_pruner_init()

M0_INTERNAL int m0_dtm0_pruner_init ( struct m0_dtm0_pruner dpn,
struct m0_dtm0_pruner_cfg dpn_cfg 
)

Definition at line 33 of file pruner.c.

Here is the caller graph for this function:

◆ m0_dtm0_pruner_start()

M0_INTERNAL void m0_dtm0_pruner_start ( struct m0_dtm0_pruner dpn)

Definition at line 43 of file pruner.c.

◆ m0_dtm0_pruner_stop()

M0_INTERNAL void m0_dtm0_pruner_stop ( struct m0_dtm0_pruner dpn)

Definition at line 47 of file pruner.c.

◆ M0_XCA_DOMAIN()

struct m0_cm_repreb_sw M0_XCA_DOMAIN ( rpc  )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 153 of file protocol.c.

Here is the call graph for this function:

◆ protocol_print()

static void protocol_print ( int  dom)
static

Definition at line 97 of file protocol.c.

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

◆ repreb_sw_fom_fini()

static void repreb_sw_fom_fini ( struct m0_fom fom)
static

Definition at line 119 of file sw_onwire_fom.c.

Here is the call graph for this function:

◆ repreb_sw_fom_home_locality()

static size_t repreb_sw_fom_home_locality ( const struct m0_fom fom)
static

Definition at line 127 of file sw_onwire_fom.c.

Here is the call graph for this function:

◆ repreb_sw_fom_tick()

static int repreb_sw_fom_tick ( struct m0_fom fom)
static

Definition at line 66 of file sw_onwire_fom.c.

Here is the call graph for this function:

◆ type_print()

static void type_print ( const struct m0_xcode_type xt)
static

Definition at line 80 of file protocol.c.

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

◆ usage_print()

void usage_print ( const char *  progname)

Definition at line 139 of file protocol.c.

Here is the caller graph for this function:

Variable Documentation

◆ m0_cm_repreb_sw_fopt

struct m0_fop_type m0_cm_repreb_sw_fopt

◆ m0_cm_repreb_sw_onwire_conf [1/2]

const struct m0_sm_conf m0_cm_repreb_sw_onwire_conf

Definition at line 60 of file sw_onwire_fom.c.

◆ m0_cm_repreb_sw_onwire_conf [2/2]

const struct m0_sm_conf m0_cm_repreb_sw_onwire_conf
Initial value:
= {
.scf_name = "Repair/re-balance sw update",
.scf_nr_states = ARRAY_SIZE(repreb_sw_fom_phases),
.scf_state = repreb_sw_fom_phases
}
static struct m0_sm_state_descr repreb_sw_fom_phases[]
Definition: sw_onwire_fom.c:47
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 60 of file sw_onwire_fom.c.

◆ m0_sm__conf_init

void(* m0_sm__conf_init) (const struct m0_sm_conf *conf)

Definition at line 137 of file protocol.c.

◆ repreb_sw_fom_ops

const struct m0_fom_ops repreb_sw_fom_ops
static
Initial value:
= {
.fo_fini = repreb_sw_fom_fini,
.fo_tick = repreb_sw_fom_tick,
.fo_home_locality = repreb_sw_fom_home_locality,
}
static int repreb_sw_fom_tick(struct m0_fom *fom)
Definition: sw_onwire_fom.c:66
static void repreb_sw_fom_fini(struct m0_fom *fom)
static size_t repreb_sw_fom_home_locality(const struct m0_fom *fom)

Definition at line 135 of file sw_onwire_fom.c.

◆ repreb_sw_fom_phases

struct m0_sm_state_descr repreb_sw_fom_phases[]
static
Initial value:
= {
.sd_flags = M0_SDF_INITIAL,
.sd_name = "Start",
.sd_allowed = M0_BITS(SWOPH_FINI)
},
[SWOPH_FINI] = {
.sd_flags = M0_SDF_TERMINAL,
.sd_name = "Fini",
.sd_allowed = 0
},
}
#define M0_BITS(...)
Definition: misc.h:236

Definition at line 47 of file sw_onwire_fom.c.

◆ xcode_domain_name

const char* xcode_domain_name = "all"
static

Definition at line 95 of file protocol.c.

◆ xt

struct m0_xcode_type** xt[]
static
Initial value:
= {
#define _XT(x)
}

Definition at line 64 of file protocol.c.