40 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_DTM 59 struct m0_dtm *dtm, uint32_t nr_max)
128 .hit_name =
"dtx-party",
145 pa =
M0_AMB(pa, history, pa_ch.ch_history);
155 .hio_persistent = (
void *)&
dtx_noop,
172 for (
i = 0, pa = dtx->
dt_party; i < dtx->dt_nr; ++
i, ++pa) {
179 history->
h_rem = rem;
202 .hit_name =
"distributed transaction service side",
217 .hio_persistent = (
void *)&
dtx_noop,
242 #undef M0_TRACE_SUBSYSTEM struct m0_dtm_dtx_party * dt_party
#define M0_ALLOC_ARR(arr, nr)
static struct m0_dtm_controlh * dtx_get(struct m0_dtm_dtx *dtx, struct m0_dtm_remote *rem)
static int dtx_srv_find(struct m0_dtm *dtm, const struct m0_dtm_history_type *ht, const struct m0_uint128 *id, struct m0_dtm_history **out)
static void dtx_fixed(struct m0_dtm_history *history)
M0_INTERNAL void m0_dtm_controlh_fini(struct m0_dtm_controlh *ch)
M0_INTERNAL const struct m0_dtm_history_type m0_dtm_dtx_htype
#define oper_for(o, update)
static const struct m0_uint128 * dtx_srv_id(const struct m0_dtm_history *history)
struct m0_dtm_remote * h_rem
M0_INTERNAL void m0_dtm_controlh_init(struct m0_dtm_controlh *ch, struct m0_dtm *dtm)
M0_INTERNAL const struct m0_dtm_history_type m0_dtm_dtx_srv_htype
struct m0_dtm_catalogue d_cat[M0_DTM_HISTORY_TYPE_NR]
M0_INTERNAL struct m0_dtm_update * up_update(struct m0_dtm_up *up)
struct m0_dtm_dtx * pa_dtx
static const struct m0_uint128 * dtx_id(const struct m0_dtm_history *history)
int(* hio_update)(struct m0_dtm_history *history, uint8_t id, struct m0_dtm_update *update)
struct m0_dtm_history ch_history
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL bool oper_update_unique(const struct m0_dtm_oper *oper, const struct m0_dtm_update *update)
#define M0_AMB(obj, ptr, field)
M0_INTERNAL int m0_dtm_catalogue_find(struct m0_dtm_catalogue *cat, struct m0_dtm *dtm, const struct m0_uint128 *id, m0_dtm_catalogue_alloc_t *alloc, void *datum, struct m0_dtm_history **out)
static const struct m0_dtm_history_type_ops dtx_htype_ops
static int dtx_find(struct m0_dtm *dtm, const struct m0_dtm_history_type *ht, const struct m0_uint128 *id, struct m0_dtm_history **out)
static void dtx_noop(void *unused)
static struct m0_dtm_history * pa_history(struct m0_dtm_dtx_party *pa)
M0_INTERNAL void m0_dtm_dtx_close(struct m0_dtm_dtx *dtx)
struct m0_dtm_controlh pa_ch
M0_INTERNAL int m0_dtm_dtx_init(struct m0_dtm_dtx *dtx, const struct m0_uint128 *id, struct m0_dtm *dtm, uint32_t nr_max)
#define UPDATE_REM(update)
static const struct m0_dtm_history_type_ops dtx_srv_htype_ops
struct m0_dtm_history ds_history
M0_INTERNAL bool m0_dtm_history_invariant(const struct m0_dtm_history *history)
static struct m0_dtm_history * dtx_srv_alloc(struct m0_dtm *dtm, const struct m0_uint128 *id, void *datum)
static struct m0_dtm_dtx dx
int(* hito_find)(struct m0_dtm *dtm, const struct m0_dtm_history_type *ht, const struct m0_uint128 *id, struct m0_dtm_history **out)
const struct m0_dtm_history_type * hio_type
M0_INTERNAL void m0_dtm_controlh_fuse_close(struct m0_dtm_update *update)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL int m0_dtm_controlh_update(struct m0_dtm_history *history, uint8_t id, struct m0_dtm_update *update)
static const struct m0_dtm_history_ops dtx_ops
M0_INTERNAL void m0_dtm_history_init(struct m0_dtm_history *history, struct m0_dtm *dtm)
void(* hio_fixed)(struct m0_dtm_history *history)
M0_INTERNAL void m0_dtm_controlh_add(struct m0_dtm_controlh *ch, struct m0_dtm_oper *oper)
M0_INTERNAL void m0_dtm_dtx_fini(struct m0_dtm_dtx *dtx)
M0_INTERNAL void m0_dtm_dtx_add(struct m0_dtm_dtx *dtx, struct m0_dtm_oper *oper)
static const struct m0_dtm_history_ops dtx_srv_ops
const struct m0_dtm_history_ops * h_ops
#define M0_IMPOSSIBLE(fmt,...)
M0_INTERNAL struct m0_dtm_up * history_latest(struct m0_dtm_history *history)