29 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_DTM 120 if ((*out)->h_hi.hi_ups.t_magic == 0) {
122 (*out)->h_ops = &
hops;
134 .hit_name =
"test-histories",
205 for (j = 0; j <
OPER_NR; ++j) {
283 for (j = 0; j <
REM_NR; ++j)
305 for (j = 0; j <
REM_NR; ++j) {
342 for (j = 0; j <
OPER_NR; ++j) {
365 for (j = 0; j <
OPER_NR; ++j) {
464 #undef M0_TRACE_SUBSYSTEM #define M0_DTM_UPDATE_DATA(label, rule, ver, orig_ver)
static void dtx_pack(void)
static const struct m0_dtm_op_ops op_ops
M0_INTERNAL void m0_dtm_fini(struct m0_dtm *dtm)
static int update_init(struct m0_dtm_history *history, uint8_t id, struct m0_dtm_update *update)
M0_INTERNAL const struct m0_dtm_history_type m0_dtm_dtx_htype
static struct m0_dtm_oper_descr ode[REM_NR][OPER_NR]
struct m0_dtm_remote * h_rem
static void dtx_reply(void)
static void noop(struct m0_dtm_op *op)
M0_INTERNAL void m0_dtm_oper_init(struct m0_dtm_oper *oper, struct m0_dtm *dtm, struct m0_tl *uu)
M0_INTERNAL const struct m0_dtm_history_type m0_dtm_dtx_srv_htype
static struct m0_dtm_fol fol_remote[REM_NR]
M0_INTERNAL void m0_dtm_oper_prepared(const struct m0_dtm_oper *oper, const struct m0_dtm_remote *rem)
static struct m0_dtm dtm_local
static struct m0_dtm_update control_local[OPER_NR][2 *DTM_NR]
M0_INTERNAL void m0_dtm_oper_done(const struct m0_dtm_oper *oper, const struct m0_dtm_remote *rem)
M0_INTERNAL int m0_dtm_oper_build(struct m0_dtm_oper *oper, struct m0_tl *uu, const struct m0_dtm_oper_descr *ode)
static struct m0_dtm_oper oper_remote[REM_NR][OPER_NR]
static struct m0_dtm dtm_remote[REM_NR]
M0_INTERNAL void dtm_lock(struct m0_dtm *dtm)
static void dtx_setup(void)
M0_INTERNAL void m0_dtm_history_fini(struct m0_dtm_history *history)
const struct m0_dtm_update_ops * upd_ops
struct m0_dtm_dtx * pa_dtx
static struct m0_uint128 id0[UPDATE_NR *DTM_NR]
static struct m0_dtm_history history0[UPDATE_NR *DTM_NR]
static void never(struct m0_dtm_op *op)
M0_INTERNAL void m0_dtm_update_link(struct m0_tl *list, struct m0_dtm_update *update, uint32_t nr)
M0_INTERNAL void m0_dtm_history_type_register(struct m0_dtm *dtm, const struct m0_dtm_history_type *ht)
const struct m0_dtm_op_ops * op_ops
M0_INTERNAL void m0_dtm_history_persistent(struct m0_dtm_history *history, m0_dtm_ver_t upto)
static const struct m0_dtm_history_ops hops
M0_INTERNAL void m0_dtm_oper_pack(struct m0_dtm_oper *oper, const struct m0_dtm_remote *rem, struct m0_dtm_oper_descr *ode)
static const struct m0_dtm_history_type_ops htype_ops
struct m0_dtm_update_descr * ou_update
static int hfind(struct m0_dtm *dtm, const struct m0_dtm_history_type *ht, const struct m0_uint128 *id, struct m0_dtm_history **out)
M0_INTERNAL void m0_dtm_fol_init(struct m0_dtm_fol *fol, struct m0_dtm *dtm)
struct m0_ut_suite dtm_dtx_ut
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)
static struct m0_dtm_update control_remote[REM_NR][OPER_NR][1]
M0_INTERNAL void m0_dtm_history_type_deregister(struct m0_dtm *dtm, const struct m0_dtm_history_type *ht)
static struct m0_dtm_history * history_local
void(* doo_ready)(struct m0_dtm_op *op)
static void dtx_populate(void)
static struct m0_dtm_update_descr udescr[REM_NR][OPER_NR][FAN_NR]
static const struct m0_dtm_update_ops test_ops
#define m0_forall(var, nr,...)
M0_INTERNAL void m0_dtm_init(struct m0_dtm *dtm, struct m0_uint128 *id)
M0_INTERNAL const struct m0_dtm_history_type m0_dtm_fol_remote_htype
static void dtm_setup(void)
M0_INTERNAL void m0_dtm_reply_unpack(struct m0_dtm_oper *oper, const struct m0_dtm_oper_descr *reply)
M0_INTERNAL void m0_dtm_update_init(struct m0_dtm_update *update, struct m0_dtm_history *history, struct m0_dtm_oper *oper, const struct m0_dtm_update_data *data)
static struct m0_dtm_dtx dx
static struct m0_dtm_oper_descr ode_reply[REM_NR][OPER_NR]
static const struct m0_dtm_update_type test_utype
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
static struct m0_dtm_update_descr ureply[REM_NR][OPER_NR][FAN_NR]
static void test_persistent(struct m0_dtm_history *history)
static void dtx_fix(void)
M0_INTERNAL void m0_dtm_oper_close(struct m0_dtm_oper *oper)
M0_INTERNAL bool op_state(const struct m0_dtm_op *op, enum m0_dtm_state state)
M0_INTERNAL void dtm_unlock(struct m0_dtm *dtm)
#define IS_IN_ARRAY(idx, array)
static struct m0_dtm_history * history_remote[REM_NR]
static const struct m0_dtm_history_type htype
M0_INTERNAL void m0_dtm_history_init(struct m0_dtm_history *history, struct m0_dtm *dtm)
M0_INTERNAL void m0_dtm_local_remote_fini(struct m0_dtm_local_remote *lre)
#define M0_UINT128(hi, lo)
static struct m0_dtm_local_remote remote_remote[REM_NR]
M0_INTERNAL void m0_dtm_oper_fini(struct m0_dtm_oper *oper)
M0_INTERNAL void m0_dtm_update_list_init(struct m0_tl *list)
static struct m0_dtm_update update_local[OPER_NR][UPDATE_NR]
M0_INTERNAL void m0_dtm_local_remote_init(struct m0_dtm_local_remote *lre, struct m0_uint128 *id, struct m0_dtm *local, struct m0_reqh *reqh)
struct m0_dtm_remote lre_rem
struct m0_dtm_oper_updates od_updates
static const struct m0_uint128 * hid(const struct m0_dtm_history *history)
static int undo_redo(struct m0_dtm_update *updt)
M0_INTERNAL void m0_dtm_dtx_fini(struct m0_dtm_dtx *dtx)
static struct m0_dtm_oper oper_local[OPER_NR]
static struct m0_dtm_local_remote remote_local[REM_NR]
M0_INTERNAL void m0_dtm_dtx_add(struct m0_dtm_dtx *dtx, struct m0_dtm_oper *oper)
M0_INTERNAL void m0_dtm_fol_fini(struct m0_dtm_fol *fol)
M0_INTERNAL void m0_dtm_reply_pack(const struct m0_dtm_oper *oper, const struct m0_dtm_oper_descr *request, struct m0_dtm_oper_descr *reply)
static struct m0_dtm_update update_remote[REM_NR][OPER_NR][FAN_NR]
const struct m0_dtm_history_ops * h_ops
#define M0_IMPOSSIBLE(fmt,...)
int(* updo_redo)(struct m0_dtm_update *updt)