Motr  M0
transmit.c File Reference
#include "lib/trace.h"
#include "ut/ut.h"
#include "ut/ut_rpc_machine.h"
#include "lib/misc.h"
#include "lib/tlist.h"
#include "lib/errno.h"
#include "lib/assert.h"
#include "lib/memory.h"
#include "fop/fop.h"
#include "fop/fom.h"
#include "fop/fom_generic.h"
#include "reqh/reqh.h"
#include "reqh/reqh_service.h"
#include "rpc/rpc_opcodes.h"
#include "dtm/dtm_internal.h"
#include "dtm/operation.h"
#include "dtm/operation_xc.h"
#include "dtm/history.h"
#include "dtm/remote.h"
#include "dtm/update.h"
#include "dtm/fol.h"
#include "dtm/ltx.h"
#include "dtm/dtm.h"
Include dependency graph for transmit.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DTM
 

Enumerations

enum  { OPER_NR = 64, UPDATE_NR = 6, TGT_DELTA = 4 }
 
enum  { FOM_INIT = M0_FOM_PHASE_INIT, FOM_READY = M0_FOM_PHASE_NR }
 

Functions

M0_INTERNAL void up_print (const struct m0_dtm_up *up)
 
M0_INTERNAL void op_print (const struct m0_dtm_op *op)
 
M0_INTERNAL void hi_print (const struct m0_dtm_hi *hi)
 
static void noop (struct m0_dtm_op *op)
 
static int undo_redo (struct m0_dtm_update *updt)
 
static int update_init (struct m0_dtm_history *history, uint8_t id, struct m0_dtm_update *update)
 
static void test_persistent (struct m0_dtm_history *history)
 
static int src_find (struct m0_dtm *dtm, const struct m0_dtm_history_type *ht, const struct m0_uint128 *id, struct m0_dtm_history **out)
 
static const struct m0_uint128src_id (const struct m0_dtm_history *history)
 
static int tgt_find (struct m0_dtm *dtm, const struct m0_dtm_history_type *ht, const struct m0_uint128 *id, struct m0_dtm_history **out)
 
static const struct m0_uint128tgt_id (const struct m0_dtm_history *history)
 
static int service_start (struct m0_reqh_service *service)
 
static void service_stop (struct m0_reqh_service *service)
 
static void service_fini (struct m0_reqh_service *service)
 
static int service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
static void test_fom_fini (struct m0_fom *fom)
 
static void op_ready (struct m0_dtm_op *op)
 
static void op_late (struct m0_dtm_op *op)
 
static void op_miser (struct m0_dtm_op *op)
 
static int test_fom_tick (struct m0_fom *fom)
 
static size_t test_fom_home_locality (const struct m0_fom *fom)
 
static int test_fom_create (struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
 
static void rpc_fop_fom_init (void)
 
static void rpc_fop_fom_fini (void)
 
static void src_init (struct m0_dtm_remote *dtm, unsigned flags, int ctrl)
 
static void src_fini (void)
 
static void tgt_init (void)
 
static void tgt_fini (void)
 
static void oper_populate (int i, unsigned nr)
 
static void transmit_build (void)
 
static void transmit_test (void)
 
static void redo_test (void)
 

Variables

static struct m0_uint128 dtm_id_src = { 1, 1 }
 
static struct m0_uint128 dtm_id_tgt = { 2, 2 }
 
static struct m0_tl uu
 
static struct m0_dtm dtm_src
 
static struct m0_dtm dtm_tgt
 
static struct m0_dtm_local_remote tgt
 
static struct m0_dtm_local_remote local
 
static struct m0_dtm_oper oper_src [OPER_NR]
 
static struct m0_dtm_oper oper_tgt [OPER_NR]
 
static struct m0_dtm_update update_src [OPER_NR][UPDATE_NR]
 
static struct m0_dtm_update update_tgt [OPER_NR][UPDATE_NR+TGT_DELTA]
 
static struct m0_dtm_update control_src [OPER_NR][TGT_DELTA]
 
static struct m0_dtm_update control_tgt [OPER_NR][TGT_DELTA]
 
static struct m0_dtm_history history_src [UPDATE_NR]
 
static struct m0_dtm_history history_tgt [UPDATE_NR]
 
static struct m0_uint128 id_src [UPDATE_NR]
 
static struct m0_uint128 id_tgt [UPDATE_NR]
 
static struct m0_dtm_update_descr udescr [UPDATE_NR+TGT_DELTA]
 
static struct m0_dtm_update_descr udescr_reply [UPDATE_NR+TGT_DELTA]
 
static struct m0_fop redo_fop [OPER_NR]
 
static struct m0_fom redo_fom [OPER_NR]
 
static struct m0_dtm_oper_descr redo_ode [OPER_NR]
 
static struct m0_dtm_update_descr redo_udescr [OPER_NR][UPDATE_NR+TGT_DELTA]
 
static struct m0_dtm_oper_descr ode
 
static struct m0_dtm_oper_descr reply
 
static m0_dtm_ver_t last [UPDATE_NR]
 
static struct m0_ut_rpc_mach_ctx test_ctx
 
static const struct m0_dtm_update_type test_utype
 
static const struct m0_dtm_update_ops test_ops
 
static const struct m0_dtm_op_ops op_ops
 
static const struct m0_dtm_history_type_ops src_htype_ops
 
static const struct m0_dtm_history_type src_htype
 
static const struct m0_dtm_history_ops src_ops
 
static const struct m0_dtm_history_type_ops tgt_htype_ops
 
static const struct m0_dtm_history_type tgt_htype
 
static const struct m0_dtm_history_ops tgt_ops
 
static struct m0_fop_type test_fopt
 
static struct m0_reqh_servicetest_svc
 
static const struct m0_fop_type_ops test_ftype_ops
 
static const struct m0_reqh_service_ops test_service_ops
 
static const struct m0_reqh_service_type_ops stype_ops
 
struct m0_reqh_service_type test_stype
 
static unsigned ticked
 
static const struct m0_dtm_op_ops test_op_ops
 
static struct m0_sm_state_descr fom_phases []
 
const struct m0_sm_conf test_conf
 
static struct m0_mutex lock
 
static struct m0_semaphore seq
 
static const struct m0_fom_ops test_fom_ops
 
static const struct m0_fom_type_ops test_fom_type_ops
 
struct m0_ut_suite dtm_transmit_ut
 

Function Documentation

◆ noop()

static void noop ( struct m0_dtm_op op)
static

Definition at line 103 of file transmit.c.

◆ test_persistent()

static void test_persistent ( struct m0_dtm_history history)
static

Definition at line 130 of file transmit.c.

◆ undo_redo()

static int undo_redo ( struct m0_dtm_update updt)
static

Definition at line 106 of file transmit.c.

◆ update_init()

static int update_init ( struct m0_dtm_history history,
uint8_t  id,
struct m0_dtm_update update 
)
static

Definition at line 122 of file transmit.c.