23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CM 107 return m0_cm_cp_pump_bob_check(cp_pump) &&
164 else if (
rc == -ENODATA) {
198 " swu complete= %d proxy_nr= %"PRIu64,
235 p_fom = &cp_pump->
p_fom;
305 .sd_name =
"copy packet allocate",
310 .sd_name =
"copy packet data next",
316 .sd_name =
"copy packet pump complete",
321 .sd_name =
"pump cp stop",
326 .sd_name =
"copy packet pump fail",
331 .sd_name =
"copy packet pump finish",
338 {
"Copy packet allocated",
341 {
"Copy packet allocation failed",
344 {
"Copy packet created, create next copy packet",
347 {
"No more data to pump",
350 {
"Copy packet creation failed",
353 {
"No more data to create copy packets",
359 {
"Pump STOP, allocate copy packet",
410 m0_cm_cp_pump_bob_fini(cp_pump);
441 m0_cm_cp_pump_bob_init(cp_pump);
493 #undef M0_TRACE_SUBSYSTEM uint64_t cm_aggr_grps_in_nr
M0_INTERNAL void m0_cm_frozen_ag_cleanup(struct m0_cm *cm, struct m0_cm_proxy *proxy)
static int(* pump_action[])(struct m0_cm_cp_pump *cp_pump)
struct m0_be_domain * bs_domain
M0_INTERNAL void m0_cm_lock(struct m0_cm *cm)
const struct m0_cm_type * cm_type
static int cpp_fail(struct m0_cm_cp_pump *cp_pump)
M0_INTERNAL void m0_fom_block_enter(struct m0_fom *fom)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
void(* sa_cb)(struct m0_sm_group *grp, struct m0_sm_ast *)
const struct m0_cm_ops * cm_ops
static struct m0_sm_group * grp
#define M0_LOG(level,...)
struct m0_sm_group fl_group
M0_INTERNAL void m0_sm_ast_post(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL int m0_cm_stop(struct m0_cm *cm)
M0_INTERNAL void m0_dtx_init(struct m0_dtx *tx, struct m0_be_domain *be_domain, struct m0_sm_group *sm_group)
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
M0_INTERNAL void m0_dtx_opened(struct m0_dtx *tx)
struct m0_fom_type ct_pump_fomt
struct m0_sm_ast p_wakeup
M0_INTERNAL void m0_cm_cp_fom_init(struct m0_cm *cm, struct m0_cm_cp *cp, struct m0_fop *fop, struct m0_fop *r_fop)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
static int cpp_complete(struct m0_cm_cp_pump *cp_pump)
uint64_t cm_aggr_grps_out_nr
#define container_of(ptr, type, member)
static uint64_t cm_cp_pump_fom_locality(const struct m0_fom *fom)
static int cpp_stop(struct m0_cm_cp_pump *cp_pump)
M0_INTERNAL void m0_cm_cp_pump_init(struct m0_cm_type *cmtype)
const struct m0_fom_type * fo_type
M0_INTERNAL int m0_cm_data_next(struct m0_cm *cm, struct m0_cm_cp *cp)
M0_INTERNAL void m0_cm_unlock(struct m0_cm *cm)
static struct m0_sm_ast ast[NR]
void m0_fom_init(struct m0_fom *fom, const struct m0_fom_type *fom_type, const struct m0_fom_ops *ops, struct m0_fop *fop, struct m0_fop *reply, struct m0_reqh *reqh)
M0_INTERNAL bool m0_fom_is_waiting(const struct m0_fom *fom)
struct m0_sm_conf cm_cp_pump_conf
M0_INTERNAL void m0_cm_cp_pump_prepare(struct m0_cm *cm)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL void m0_fom_ready(struct m0_fom *fom)
#define M0_AMB(obj, ptr, field)
M0_INTERNAL void m0_dtx_open(struct m0_dtx *tx)
static void cm_cp_pump_fom_fini(struct m0_fom *fom)
void m0_fom_fini(struct m0_fom *fom)
static bool cm_cp_pump_invariant(const struct m0_cm_cp_pump *cp_pump)
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
#define bob_of(ptr, type, field, bt)
M0_INTERNAL void m0_fom_type_init(struct m0_fom_type *type, uint64_t id, const struct m0_fom_type_ops *ops, const struct m0_reqh_service_type *svc_type, const struct m0_sm_conf *sm)
const struct m0_cm_cp_ops * c_ops
M0_INTERNAL void m0_fom_block_leave(struct m0_fom *fom)
static void complete_wakeup(struct m0_sm_group *grp, struct m0_sm_ast *ast)
struct m0_sm_trans_descr cm_cp_pump_td[]
M0_INTERNAL void m0_cm_cp_pump_start(struct m0_cm *cm)
M0_INTERNAL void m0_dtx_fini(struct m0_dtx *tx)
M0_BOB_DEFINE(static, &pump_bob, m0_cm_cp_pump)
struct m0_sm_ast * sa_next
M0_INTERNAL void m0_cm_cp_pump_destroy(struct m0_cm *cm)
static int cpp_data_next(struct m0_cm_cp_pump *cp_pump)
M0_INTERNAL void m0_dtx_done(struct m0_dtx *tx)
struct m0_chan cm_complete
static int cpp_alloc(struct m0_cm_cp_pump *cp_pump)
struct m0_cm_cp *(* cmo_cp_alloc)(struct m0_cm *cm)
M0_INTERNAL int m0_cm_cp_enqueue(struct m0_cm *cm, struct m0_cm_cp *cp)
bool m0_cm_cp_pump_is_complete(const struct m0_cm_cp_pump *cp_pump)
#define M0_MAGIX_OFFSET(type, field)
struct m0_cm_sw_update cm_sw_update
#define M0_FI_ENABLED(tag)
struct m0_fom_locality * fo_loc
static bool pump_cb(struct m0_clink *link)
static int cm_cp_pump_fom_tick(struct m0_fom *fom)
static void pump_move(struct m0_cm_cp_pump *cp_fom, int rc, int phase)
M0_INTERNAL void m0_clink_add(struct m0_chan *chan, struct m0_clink *link)
static const struct m0_fom_ops cm_cp_pump_fom_ops
M0_INTERNAL int m0_cm_sw_remote_update(struct m0_cm *cm)
struct m0_reqh_service cm_service
M0_INTERNAL int m0_fom_rc(const struct m0_fom *fom)
M0_INTERNAL bool m0_cm_aggr_group_tlists_are_empty(struct m0_cm *cm)
enum m0_dtx_state tx_state
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
struct m0_be_seg * rh_beseg
struct m0_reqh_service_type ct_stype
void(* co_free)(struct m0_cm_cp *cp)
M0_INTERNAL void m0_fom_queue(struct m0_fom *fom)
void(* fo_fini)(struct m0_fom *fom)
struct m0_cm_cp_pump cm_cp_pump
static struct m0_cm * pump2cm(const struct m0_cm_cp_pump *cp_pump)
M0_INTERNAL void m0_cm_abort(struct m0_cm *cm, int rc)
M0_INTERNAL bool m0_cm_is_locked(const struct m0_cm *cm)
M0_INTERNAL int m0_cm_complete(struct m0_cm *cm)
static const struct m0_fom_type_ops cm_cp_pump_fom_type_ops
static const struct m0_bob_type pump_bob
struct m0_fom_callback fo_cb
M0_INTERNAL struct m0_reqh * m0_fom_reqh(const struct m0_fom *fom)
static struct m0_sm_state_descr cm_cp_pump_sd[CPP_NR]
M0_INTERNAL const char * m0_fom_phase_name(const struct m0_fom *fom, int phase)
struct m0_clink p_complete