23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_DTM0 26 #include "cas/cas_xc.h" 28 #include "dtm0/fop_xc.h" 63 struct m0_fop **cas_fop_out);
105 m0_xc_dtm0_fop_fini();
124 .sd_name =
"logging",
129 .sd_name =
"dtm0-to-cas",
134 .sd_name =
"cas-done",
179 m0_xc_dtm0_fop_init();
181 .
name =
"DTM0 request",
183 .
xt = dtm0_req_fop_xc,
191 .
xt = dtm0_req_fop_xc,
197 .
name =
"DTM0 reply",
199 .
xt = dtm0_rep_fop_xc,
306 const struct m0_fid *target;
335 "in cas_fom_tick().");
424 FID_P(&
fom->fo_service->rs_service_fid),
425 fom->fo_service->rs_reqh);
450 return M0_RC(result);
469 const struct m0_fid *
tgt = &
req->dtr_txr.dtd_id.dti_fid;
472 .dtr_txr =
req->dtr_txr,
494 return M0_RC(result);
512 rc =
rep->cgr_rep.cr_rec[0].cr_rc;
526 cas_fop, on_cas_fom_complete);
535 struct m0_fop **cas_fop_out)
551 req->dtr_payload.b_addr,
552 req->dtr_payload.b_nob);
560 *cas_fop_out = cas_fop;
627 return M0_RC(result);
646 &
req->dtr_txr.dtd_id.dti_fid));
651 return M0_RC(result);
M0_INTERNAL bool m0_dtm0_is_a_volatile_dtm(struct m0_reqh_service *service)
M0_INTERNAL void m0_sm_conf_init(struct m0_sm_conf *conf)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
#define M0_BE_QUEUE_PUT(bq, op, ptr)
static const struct m0_fom_ops dtm0_pmsg_fom_ops
M0_INTERNAL struct m0_dtm0_service * m0_dtm0_service_find(const struct m0_reqh *reqh)
static size_t locality(const struct m0_fom *fom)
static void init_once(void *foo)
static struct m0_sm_conf dtm0_conf
#define M0_FOP_TYPE_INIT(ft,...)
static struct io_request req
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
struct m0_reqh_service_type dtm0_service_type
#define M0_LOG(level,...)
static const struct m0_fom_ops dtm0_tmsg_fom_ops
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
struct m0_dtm0_tx_desc dlr_txd
#define M0_BE_OP_SYNC(op_obj, action)
struct m0_sm_trans_descr dtm0_phases_trans[]
void * m0_fop_data(const struct m0_fop *fop)
void m0_fop_type_fini(struct m0_fop_type *fopt)
M0_INTERNAL void m0_sm_conf_trans_extend(const struct m0_sm_conf *base, struct m0_sm_conf *sub)
M0_INTERNAL void m0_sm_conf_extend(const struct m0_sm_state_descr *base, struct m0_sm_state_descr *sub, uint32_t nr)
static int dtm0_rmsg_fom_tick(struct m0_fom *fom)
static const struct m0_fom_ops dtm0_emsg_fom_ops
M0_INTERNAL int m0_cas_fom_spawn(struct m0_fom *lead, struct m0_fom_thralldom *thrall, struct m0_fop *cas_fop, void(*on_fom_complete)(struct m0_fom_thralldom *, struct m0_fom *))
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
static struct m0_xcode_type ** xt[]
const struct m0_sm_conf m0_generic_conf
struct m0_fop_getxattr_rep * rep
M0_INTERNAL int m0_dtm0_on_committed(struct m0_fom *fom, const struct m0_dtm0_tid *id)
struct m0_fom_type ft_fom_type
struct m0_be_dtm0_log * dos_log
struct m0_dtm0_tid dtd_id
M0_INTERNAL bool m0_dtm0_is_a_persistent_dtm(struct m0_reqh_service *service)
M0_INTERNAL int m0_dtm0_fop_init(void)
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)
#define M0_RC_INFO(rc, fmt,...)
struct m0_fop_type * f_type
static void dtm0_cas_done_cb(struct m0_fom_thralldom *thrall, struct m0_fom *serf)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL void m0_be_queue_unlock(struct m0_be_queue *bq)
#define M0_AMB(obj, ptr, field)
struct m0_fom_thralldom thrall
int m0_fom_tick_generic(struct m0_fom *fom)
void m0_fom_fini(struct m0_fom *fom)
M0_INTERNAL void m0_be_dtm0_log_pmsg_post(struct m0_be_dtm0_log *log, struct m0_fop *fop)
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
struct m0_fid rs_service_fid
M0_INTERNAL void m0_be_tx_credit_add(struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
static const struct m0_fom_type_ops dtm0_req_fom_type_ops
M0_INTERNAL void m0_dtm0_fop_fini(void)
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
struct m0_fop_type dtm0_redo_fop_fopt
static void dtm0_fom_fini(struct m0_fom *fom)
static int dtm0_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
static const struct m0_fom_ops dtm0_rmsg_fom_ops
struct m0_fop * m0_fop_reply_alloc(struct m0_fop *req, struct m0_fop_type *rept)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
M0_INTERNAL int m0_dtm0_tx_desc_copy(const struct m0_dtm0_tx_desc *src, struct m0_dtm0_tx_desc *dst)
struct m0_dtm0_tx_pa * dtp_pa
struct m0_pdclust_tgt_addr tgt
struct m0_sm_state_descr dtm0_phases[]
struct m0_sm_state_descr * scf_state
static int dtm0_pmsg_fom_tick(struct m0_fom *fom)
M0_INTERNAL int m0_be_dtm0_log_update(struct m0_be_dtm0_log *log, struct m0_be_tx *tx, struct m0_dtm0_tx_desc *txd, struct m0_buf *payload)
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
static int dtm0_cas_fop_prepare(struct dtm0_req_fop *req, struct m0_fop_type *cas_fopt, struct m0_fop **cas_fop_out)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_be_dtm0_log_credit(enum m0_be_dtm0_log_credit_op op, struct m0_dtm0_tx_desc *txd, struct m0_buf *payload, struct m0_be_seg *seg, struct m0_dtm0_log_rec *rec, struct m0_be_tx_credit *accum)
int m0_fop_type_addb2_instrument(struct m0_fop_type *type)
M0_INTERNAL int m0_xcode_obj_dec_from_buf(struct m0_xcode_obj *obj, void *buf, m0_bcount_t len)
static struct m0_net_test_service svc
M0_INTERNAL int m0_fom_rc(const struct m0_fom *fom)
M0_INTERNAL struct m0_dtm0_service * m0_dtm0_fom2service(struct m0_fom *fom)
struct m0_sm_trans_descr m0_generic_phases_trans[]
static struct m0_fop * fop
M0_INTERNAL void m0_be_queue_lock(struct m0_be_queue *bq)
static int dtm0_emsg_fom_tick(struct m0_fom *fom)
struct m0_dtm0_tx_participants dtd_ps
static int dtm0_tmsg_fom_tick(struct m0_fom *fom)
static size_t dtm0_fom_locality(const struct m0_fom *fom)
void(* fo_fini)(struct m0_fom *fom)
struct m0_fop * fo_rep_fop
#define M0_ASSERT_INFO(cond, fmt,...)
#define M0_XCODE_OBJ(type, ptr)
M0_INTERNAL struct m0_fop_type cas_put_fopt
static struct m0_cas_op * cas_op(const struct m0_fom *fom)
M0_INTERNAL struct m0_dtm0_log_rec * m0_be_dtm0_log_find(struct m0_be_dtm0_log *log, const struct m0_dtm0_tid *id)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
M0_INTERNAL int m0_dtm0_logrec_update(struct m0_be_dtm0_log *log, struct m0_be_tx *tx, struct m0_dtm0_tx_desc *txd, struct m0_buf *payload)
static struct m0_dtm_oper_descr reply
M0_INTERNAL int m0_dtm0_req_post(struct m0_dtm0_service *svc, struct m0_be_op *op, const struct dtm0_req_fop *req, const struct m0_fid *tgt, const struct m0_fom *parent_fom, bool wait_for_ack)
M0_INTERNAL void m0_dtm0_tx_desc_fini(struct m0_dtm0_tx_desc *td)
struct m0_reqh_service dos_generic
struct m0_fop_type dtm0_req_fop_fopt
static int dtm0_cas_fom_spawn(struct dtm0_fom *dfom, struct m0_fop *cas_fop, void(*on_cas_fom_complete)(struct m0_fom_thralldom *, struct m0_fom *))
struct m0_fom_thralldom dtf_thrall
M0_INTERNAL struct m0_reqh * m0_fom_reqh(const struct m0_fom *fom)
M0_INTERNAL bool m0_dtm0_in_ut(void)
#define M0_IMPOSSIBLE(fmt,...)
struct m0_fop_type dtm0_rep_fop_fopt