23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 91 for (j = 0; j < reg.
br_size; ++j)
108 for (j = 0; j <
size; ++j)
199 if (i < seg->bs_reserved)
245 if (i < seg->bs_reserved)
250 if (block_begin_new != block_begin) {
258 size_left, block,
true);
259 block_begin = block_begin_new;
264 block[
i - block_begin] = byte;
298 M0_LOG(
M0_DEBUG,
"check if in-memory segment data is initially zeroed");
425 #undef M0_TRACE_SUBSYSTEM
void m0_be_ut_seg_multiple(void)
M0_INTERNAL int m0_be_seg__write(struct m0_be_reg *reg, void *src)
void m0_be_ut_seg_fini(struct m0_be_ut_seg *ut_seg)
static void be_ut_seg_rand_reg(struct m0_be_reg *reg, void *seg_addr, m0_bindex_t *offset, m0_bcount_t *size, uint64_t *seed)
M0_INTERNAL void m0_be_seg_fini(struct m0_be_seg *seg)
M0_INTERNAL int m0_be_seg_create_multiple(struct m0_stob *stob, const struct m0_be_seg_geom *geom)
int m0_thread_join(struct m0_thread *q)
M0_INTERNAL void m0_be_ut_seg_io(void)
#define M0_LOG(level,...)
M0_INTERNAL void * m0_be_ut_seg_allocate_addr(m0_bcount_t size)
struct m0_be_seg * bus_seg
M0_INTERNAL int m0_be_seg_create(struct m0_be_seg *seg, m0_bcount_t size, void *addr)
M0_INTERNAL void m0_be_ut_seg_open_close(void)
struct m0_be_ut_seg ut_seg
void m0_be_ut_seg_init(struct m0_be_ut_seg *ut_seg, struct m0_be_ut_backend *ut_be, m0_bcount_t size)
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
static void be_ut_seg_large_stob(struct m0_be_seg *seg, char byte, m0_bcount_t size, bool check)
#define M0_BE_REG(seg, size, addr)
M0_INTERNAL int m0_be_seg_open(struct m0_be_seg *seg)
M0_INTERNAL uint64_t m0_round_down(uint64_t val, uint64_t size)
M0_INTERNAL struct m0_stob * m0_ut_stob_linux_get(void)
static struct m0_stob * stob
M0_INTERNAL int m0_be_seg__read(struct m0_be_reg *reg, void *dst)
M0_BASSERT(BE_UT_SEG_IO_OFFS+BE_UT_SEG_IO_SIZE<=BE_UT_SEG_SIZE)
M0_INTERNAL void m0_be_seg_close(struct m0_be_seg *seg)
void m0_thread_fini(struct m0_thread *q)
static int cmp(const struct m0_ut_suite **s0, const struct m0_ut_suite **s1)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
void * m0_alloc(size_t size)
static m0_bindex_t offset
M0_INTERNAL void m0_ut_stob_put(struct m0_stob *stob, bool destroy)
M0_INTERNAL void m0_be_seg_init(struct m0_be_seg *seg, struct m0_stob *stob, struct m0_be_domain *dom, uint64_t seg_id)
void m0_be_ut_seg_large_multiple(void)
#define m0_forall(var, nr,...)
static void be_ut_seg_thread_func(struct m0_semaphore *barrier)
void m0_be_ut_seg_large(void)
M0_INTERNAL uint64_t m0_rnd64(uint64_t *seed)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
static void be_ut_seg_large_mem(struct m0_be_seg *seg, char byte, m0_bcount_t size, bool check)
M0_INTERNAL int m0_be_seg_destroy(struct m0_be_seg *seg)
M0_INTERNAL bool m0_be_seg_geom_eq(const struct m0_be_seg_geom *left, const struct m0_be_seg_geom *right)
static int barrier(struct m0_buf *in, struct m0_buf *out, struct m0_isc_comp_private *comp_data, int *rc)
static struct m0_be_seg * seg
void check(struct workload *w)
static void be_ut_seg_large_block_io(struct m0_be_seg *seg, m0_bindex_t offset, m0_bcount_t block_size, char *block, bool read)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
struct m0_be_seg * br_seg