23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_EXTMAP 36 #define EXTMAP_UT_UNIT_SIZE 10 37 #define EXTMAP_UT_CS_SIZE 16 235 uint64_t
val[] = { 1, 2, 3, 4 };
259 for (
i = 0;
i <
nr; ++
i) {
265 (
unsigned long long)seglen);
266 total = len[0]+len[1];
395 struct m0_ext e3, e2, e1, e;
525 struct m0_ext e_temp[3], e;
527 struct m0_buf cksum[3] = {};
537 es[idx] = e_temp[idx] = e;
587 es[idx] = e_temp[idx] = e;
644 es[idx] = e_temp[idx] = e;
750 .ts_name =
"be-emap-ut",
868 #undef M0_TRACE_SUBSYSTEM
#define EXTMAP_UT_CS_SIZE
void m0_be_ut_seg_fini(struct m0_be_ut_seg *ut_seg)
#define M0_BE_ALLOC_CREDIT_PTR(ptr, seg, accum)
#define M0_BE_ALLOC_PTR_SYNC(ptr, seg, tx)
static void split(m0_bindex_t offset, int nr, bool commit)
M0_INTERNAL m0_bcount_t m0_ext_length(const struct m0_ext *ext)
M0_INTERNAL int m0_be_ut_backend_init_cfg(struct m0_be_ut_backend *ut_be, const struct m0_be_domain_cfg *cfg, bool mkfs)
M0_INTERNAL void m0_be_emap_next(struct m0_be_emap_cursor *it)
static void test_fini(void)
static void test_paste(void)
#define M0_LOG(level,...)
struct m0_be_seg * bus_seg
#define M0_FID_INIT(container, key)
M0_INTERNAL void m0_be_tx_fini(struct m0_be_tx *tx)
M0_INTERNAL void m0_uint128_init(struct m0_uint128 *u128, const char *magic)
static void checkpoint(void)
static struct m0_uint128 prefix
#define M0_BE_OP_SYNC(op_obj, action)
M0_INTERNAL void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
M0_INTERNAL void m0_be_emap_destroy(struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op)
M0_INTERNAL void m0_be_emap_obj_insert(struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_uint128 *prefix, uint64_t val)
M0_INTERNAL void m0_be_emap_prev(struct m0_be_emap_cursor *it)
M0_INTERNAL void m0_be_emap_close(struct m0_be_emap_cursor *it)
static void test_init(void)
static struct m0_be_emap_cursor it
static int be_emap_lookup(struct m0_be_emap *map, const struct m0_uint128 *prefix, m0_bindex_t offset, struct m0_be_emap_cursor *it)
M0_INTERNAL void m0_be_tx_prep(struct m0_be_tx *tx, const struct m0_be_tx_credit *credit)
void m0_be_ut_seg_init(struct m0_be_ut_seg *ut_seg, struct m0_be_ut_backend *ut_be, m0_bcount_t size)
M0_INTERNAL void m0_be_emap_split(struct m0_be_emap_cursor *it, struct m0_be_tx *tx, struct m0_indexvec *vec, struct m0_buf *cksum)
struct m0_be_tx_credit bec_tx_size_max
M0_INTERNAL bool m0_be_emap_ext_is_first(const struct m0_ext *ext)
M0_INTERNAL void m0_be_emap_merge(struct m0_be_emap_cursor *it, struct m0_be_tx *tx, m0_bindex_t delta)
static void emap_be_free(struct m0_be_tx *tx)
struct m0_buf ee_cksum_buf
M0_INTERNAL struct m0_be_op * m0_be_emap_op(struct m0_be_emap_cursor *it)
#define M0_BE_TX_CREDIT(nr, size)
static void test_merge(void)
void m0_be_ut_backend_cfg_default(struct m0_be_domain_cfg *cfg)
static void test_obj_fini(struct m0_be_tx *tx)
M0_INTERNAL void m0_be_emap_paste(struct m0_be_emap_cursor *it, struct m0_be_tx *tx, struct m0_ext *ext, uint64_t val, void(*del)(struct m0_be_emap_seg *), void(*cut_left)(struct m0_be_emap_seg *, struct m0_ext *, uint64_t), void(*cut_right)(struct m0_be_emap_seg *, struct m0_ext *, uint64_t))
#define M0_BE_OP_SYNC_RET(op_obj, action, member)
M0_INTERNAL void m0_be_emap_init(struct m0_be_emap *map, struct m0_be_seg *db)
static void test_lookup(void)
struct m0_be_tx_credit tgc_size_max
static struct m0_be_op * it_op
static struct m0_be_seg * be_seg
M0_INTERNAL int m0_be_tx_open_sync(struct m0_be_tx *tx)
M0_INTERNAL bool m0_be_emap_ext_is_last(const struct m0_ext *ext)
M0_INTERNAL int m0_buf_alloc(struct m0_buf *buf, size_t size)
struct m0_be_op::@39::@40 u_emap
static struct m0_be_tx tx2
M0_INTERNAL void m0_be_emap_lookup(struct m0_be_emap *map, const struct m0_uint128 *prefix, m0_bindex_t offset, struct m0_be_emap_cursor *it)
static m0_bindex_t offset
M0_INTERNAL void m0_be_emap_obj_delete(struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_uint128 *prefix)
M0_INTERNAL void m0_buf_free(struct m0_buf *buf)
static void test_split(void)
#define M0_BE_FREE_PTR_SYNC(ptr, seg, tx)
static struct m0_be_ut_seg be_ut_emap_seg
static struct m0_be_emap * emap
static void emap_be_alloc(struct m0_be_tx *tx)
#define EXTMAP_UT_UNIT_SIZE
#define m0_forall(var, nr,...)
static void test_paste_checksum_validation(void)
static int test_print(void)
#define M0_ALLOC_PTR(ptr)
static struct m0_be_emap_seg * seg
void m0_be_ut_tx_init(struct m0_be_tx *tx, struct m0_be_ut_backend *ut_be)
static struct m0_be_tx tx1
M0_INTERNAL void m0_be_op_fini(struct m0_be_op *op)
void m0_be_ut_backend_fini(struct m0_be_ut_backend *ut_be)
static void m0_fi_enable_once(const char *func, const char *tag)
struct m0_be_tx_group_cfg bec_group_cfg
M0_INTERNAL void m0_be_emap_credit(struct m0_be_emap *map, enum m0_be_emap_optype optype, m0_bcount_t nr, struct m0_be_tx_credit *accum)
struct m0_buf ec_app_cksum_buf
static void test_next_prev(void)
M0_INTERNAL void m0_be_op_init(struct m0_be_op *op)
struct m0_be_engine_cfg bc_engine
M0_INTERNAL void m0_be_emap_create(struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_fid *fid)
#define M0_BE_FREE_CREDIT_PTR(ptr, seg, accum)
M0_INTERNAL void m0_be_op_wait(struct m0_be_op *op)
M0_INTERNAL struct m0_be_emap_seg * m0_be_emap_seg_get(struct m0_be_emap_cursor *it)
M0_INTERNAL void m0_be_tx_close_sync(struct m0_be_tx *tx)
static void test_obj_init(struct m0_be_tx *tx)
static struct m0_be_ut_backend be_ut_emap_backend