Motr  M0
SNS copy machine service
Collaboration diagram for SNS copy machine service:

Functions

static int rebalance_svc_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
 M0_CM_TYPE_DECLARE (sns_rebalance, M0_CM_REBALANCE_OPCODE, &rebalance_svc_type_ops, "M0_CST_SNS_REB", M0_CST_SNS_REB)
 
static int rebalance_svc_start (struct m0_reqh_service *service)
 
static void rebalance_svc_stop (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_sns_cm_rebalance_cpx_init (void)
 
M0_INTERNAL void m0_sns_cm_rebalance_cpx_fini (void)
 
static int repair_svc_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
 M0_CM_TYPE_DECLARE (sns_repair, M0_CM_REPAIR_OPCODE, &repair_svc_type_ops, "M0_CST_SNS_REP", M0_CST_SNS_REP)
 
static int repair_svc_start (struct m0_reqh_service *service)
 
static void repair_svc_stop (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_sns_cm_repair_cpx_init (void)
 
M0_INTERNAL void m0_sns_cm_repair_cpx_fini (void)
 
M0_INTERNAL int m0_sns_cm_svc_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype, const struct m0_reqh_service_ops *svc_ops, const struct m0_cm_ops *cm_ops)
 
M0_INTERNAL int m0_sns_cm_svc_start (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_sns_cm_svc_stop (struct m0_reqh_service *service)
 
M0_INTERNAL void m0_sns_cm_svc_fini (struct m0_reqh_service *service)
 

Variables

static const struct m0_reqh_service_type_ops rebalance_svc_type_ops
 
static const struct m0_reqh_service_ops rebalance_svc_ops
 
const struct m0_cm_ops sns_rebalance_ops
 
const struct m0_fom_type_ops rebalance_cp_fom_type_ops
 
static const struct m0_reqh_service_type_ops repair_svc_type_ops
 
static const struct m0_reqh_service_ops repair_svc_ops
 
M0_EXTERN const struct m0_cm_ops sns_repair_ops
 
M0_EXTERN const struct m0_fom_type_ops repair_cp_fom_type_ops
 

Detailed Description

Function Documentation

◆ M0_CM_TYPE_DECLARE() [1/2]

M0_CM_TYPE_DECLARE ( sns_repair  ,
M0_CM_REPAIR_OPCODE  ,
repair_svc_type_ops,
"M0_CST_SNS_REP"  ,
M0_CST_SNS_REP   
)

◆ M0_CM_TYPE_DECLARE() [2/2]

M0_CM_TYPE_DECLARE ( sns_rebalance  ,
M0_CM_REBALANCE_OPCODE  ,
rebalance_svc_type_ops,
"M0_CST_SNS_REB"  ,
M0_CST_SNS_REB   
)

◆ m0_sns_cm_rebalance_cpx_fini()

M0_INTERNAL void m0_sns_cm_rebalance_cpx_fini ( void  )

Definition at line 73 of file rebalance_cp_onwire.c.

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

◆ m0_sns_cm_rebalance_cpx_init()

M0_INTERNAL void m0_sns_cm_rebalance_cpx_init ( void  )

Definition at line 57 of file rebalance_cp_onwire.c.

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

◆ m0_sns_cm_repair_cpx_fini()

M0_INTERNAL void m0_sns_cm_repair_cpx_fini ( void  )

Definition at line 72 of file repair_cp_onwire.c.

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

◆ m0_sns_cm_repair_cpx_init()

M0_INTERNAL void m0_sns_cm_repair_cpx_init ( void  )

Definition at line 56 of file repair_cp_onwire.c.

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

◆ m0_sns_cm_svc_allocate()

M0_INTERNAL int m0_sns_cm_svc_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype,
const struct m0_reqh_service_ops svc_ops,
const struct m0_cm_ops cm_ops 
)

State of current running repair or rebalance process. It is used for indicating. It is used to show the status of the operation to the Spiel client.

dot_inline_dotgraph_36.png
See also
m0_spiel_sns_repair_status
m0_spiel_sns_rebalance_status Allocates and initialises SNS copy machine. This allocates struct m0_sns_cm and invokes m0_cm_init() to initialise m0_sns_cm::rc_base.

Definition at line 43 of file service.c.

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

◆ m0_sns_cm_svc_fini()

M0_INTERNAL void m0_sns_cm_svc_fini ( struct m0_reqh_service service)

Destorys SNS copy machine (struct m0_sns_cm) correponding to the given service.

Definition at line 125 of file service.c.

Here is the call graph for this function:

◆ m0_sns_cm_svc_start()

M0_INTERNAL int m0_sns_cm_svc_start ( struct m0_reqh_service service)

Sets up copy machine corresponding to the given service. Invokes m0_cm_setup().

Definition at line 73 of file service.c.

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

◆ m0_sns_cm_svc_stop()

M0_INTERNAL void m0_sns_cm_svc_stop ( struct m0_reqh_service service)

Finalises copy machine corresponding to the given service. Invokes m0_cm_fini().

Definition at line 108 of file service.c.

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

◆ rebalance_svc_allocate()

static int rebalance_svc_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Copy machine service type operations.

Allocates and initialises SNS copy machine. This allocates struct m0_sns_cm and invokes m0_cm_init() to initialise m0_sns_cm::rc_base.

Definition at line 78 of file service.c.

Here is the call graph for this function:

◆ rebalance_svc_start()

static int rebalance_svc_start ( struct m0_reqh_service service)
static

Copy machine service operations.

Definition at line 87 of file service.c.

Here is the call graph for this function:

◆ rebalance_svc_stop()

static void rebalance_svc_stop ( struct m0_reqh_service service)
static

Definition at line 101 of file service.c.

Here is the call graph for this function:

◆ repair_svc_allocate()

static int repair_svc_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Copy machine service type operations.

Allocates and initialises SNS copy machine. This allocates struct m0_sns_cm and invokes m0_cm_init() to initialise m0_sns_cm::rc_base.

Definition at line 76 of file service.c.

Here is the call graph for this function:

◆ repair_svc_start()

static int repair_svc_start ( struct m0_reqh_service service)
static

Copy machine service operations.

Definition at line 85 of file service.c.

Here is the call graph for this function:

◆ repair_svc_stop()

static void repair_svc_stop ( struct m0_reqh_service service)
static

Definition at line 99 of file service.c.

Here is the call graph for this function:

Variable Documentation

◆ rebalance_cp_fom_type_ops

const struct m0_fom_type_ops rebalance_cp_fom_type_ops

Definition at line 38 of file rebalance_cp_onwire.c.

◆ rebalance_svc_ops

const struct m0_reqh_service_ops rebalance_svc_ops
static
Initial value:
= {
.rso_start = rebalance_svc_start,
.rso_stop = rebalance_svc_stop,
.rso_fini = m0_sns_cm_svc_fini
}
M0_INTERNAL void m0_sns_cm_svc_fini(struct m0_reqh_service *service)
Definition: service.c:125
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
Definition: reqh_service.c:601
static int rebalance_svc_start(struct m0_reqh_service *service)
Definition: service.c:87
static void rebalance_svc_stop(struct m0_reqh_service *service)
Definition: service.c:101

Definition at line 60 of file service.c.

◆ rebalance_svc_type_ops

const struct m0_reqh_service_type_ops rebalance_svc_type_ops
static
Initial value:
= {
.rsto_service_allocate = rebalance_svc_allocate
}
static int rebalance_svc_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: service.c:78

Definition at line 49 of file service.c.

◆ repair_cp_fom_type_ops

M0_EXTERN const struct m0_fom_type_ops repair_cp_fom_type_ops

Definition at line 66 of file service.c.

◆ repair_svc_ops

const struct m0_reqh_service_ops repair_svc_ops
static
Initial value:
= {
.rso_start = repair_svc_start,
.rso_stop = repair_svc_stop,
.rso_fini = m0_sns_cm_svc_fini
}
M0_INTERNAL void m0_sns_cm_svc_fini(struct m0_reqh_service *service)
Definition: service.c:125
static int repair_svc_start(struct m0_reqh_service *service)
Definition: service.c:85
static void repair_svc_stop(struct m0_reqh_service *service)
Definition: service.c:99
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
Definition: reqh_service.c:601

Definition at line 58 of file service.c.

◆ repair_svc_type_ops

const struct m0_reqh_service_type_ops repair_svc_type_ops
static
Initial value:
= {
.rsto_service_allocate = repair_svc_allocate,
}
static int repair_svc_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: service.c:76

Definition at line 47 of file service.c.

◆ sns_rebalance_ops

const struct m0_cm_ops sns_rebalance_ops

Copy machine operations.

Definition at line 187 of file cm.c.

◆ sns_repair_ops

M0_EXTERN const struct m0_cm_ops sns_repair_ops

Definition at line 65 of file service.c.