22 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 47 SIZE = 4 * 1024 * 1024 * 1024ull
232 0x2222222222222222, 0x3333333333333333,
233 0x4444444444444444, 0x5555555555555555);
249 0x2222222222222222, 0x3333333333333333,
250 0x4444444444444444, 0x5555555555555555),
264 #define PAYLOAD(seq) { \ 333 for (
i = 0;
i <=
NR; ++
i)
361 nanosleep(&(
struct timespec) { .tv_sec = 0,
362 .tv_nsec = 100000000 },
NULL);
452 static uint64_t
body[8100];
461 obj->o_tr.tr_nr = 8000;
536 {
"wrap-1", &
wrap1 },
537 {
"wrap-2", &
wrap2 },
538 {
"wrap-3", &
wrap3 },
539 {
"wrap-7", &
wrap7 },
545 #undef M0_TRACE_SUBSYSTEM
void mach_fini(struct m0_addb2_mach *m)
static struct m0_addb2_storage * stor
static struct m0_semaphore pump_done
static void test_idle(struct m0_addb2_storage *stor)
static void io_idle(struct m0_addb2_storage *stor)
static struct m0_addb2_mach * m
M0_INTERNAL int m0_stob_locate(struct m0_stob *stob)
int m0_thread_join(struct m0_thread *q)
M0_INTERNAL int m0_stob_domain_destroy(struct m0_stob_domain *dom)
static void io_done(struct m0_addb2_storage *stor, struct m0_addb2_trace_obj *obj)
void(* sto_idle)(struct m0_addb2_storage *stor)
static struct m0_semaphore machwait
static m0_bcount_t stob_size
#define M0_ADDB2_PUSH(id,...)
static void test_commit(struct m0_addb2_storage *_stor, const struct m0_addb2_frame_header *_last)
M0_INTERNAL void m0_addb2_storage_stop(struct m0_addb2_storage *stor)
static void add_one(void)
static struct m0_addb2_mach * mach
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
M0_ADDB2_ADD(M0_AVI_FS_CREATE, new_fid.f_container, new_fid.f_key, mode, rc)
struct m0_addb2_trace o_tr
static void read_many(void)
static void stor_init(void)
static void fini_io(void)
static int test_submit(const struct m0_addb2_mach *m, struct m0_addb2_trace *t)
M0_INTERNAL void m0_addb2_storage_fini(struct m0_addb2_storage *stor)
void m0_addb2_push(uint64_t id, int n, const uint64_t *value)
#define M0_AMB(obj, ptr, field)
static void submit_one(void)
static struct m0_addb2_sit * sit
void(* idle)(const struct m0_addb2_mach *mach)
static struct m0_stob * stob
static void stob_put(void)
void m0_addb2_mach_stop(struct m0_addb2_mach *mach)
static void check_one(const struct m0_addb2_record *rec)
static void frame_fill(void)
static void once_idle(struct m0_addb2_storage *_stor)
static struct m0_thread t[8]
static void read_one(void)
void m0_thread_fini(struct m0_thread *q)
static struct m0_stob_domain * dom
M0_INTERNAL void m0_stob_id_make(uint64_t container, uint64_t key, const struct m0_fid *dom_id, struct m0_stob_id *stob_id)
int m0_addb2_sit_init(struct m0_addb2_sit **out, struct m0_stob *stob, m0_bindex_t start)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
struct m0_addb2_value ar_label[M0_ADDB2_LABEL_MAX]
static unsigned committed
bool receq(const struct m0_addb2_record *r0, const struct small_record *r1)
static const struct m0_addb2_storage_ops test_ops
static void write_init_fini(void)
void m0_addb2_add(uint64_t id, int n, const uint64_t *value)
static void write_many(void)
static void test_done(struct m0_addb2_storage *_stor, struct m0_addb2_trace_obj *obj)
struct m0_addb2_mach * mach_set(int(*s)(const struct m0_addb2_mach *, struct m0_addb2_trace *))
static struct m0_semaphore pump_start
void m0_addb2_pop(uint64_t id)
#define m0_forall(var, nr,...)
M0_INTERNAL int m0_stob_destroy(struct m0_stob *stob, struct m0_dtx *dtx)
M0_INTERNAL enum m0_stob_state m0_stob_state_get(struct m0_stob *stob)
static void context_clean(void)
M0_INTERNAL struct m0_addb2_storage * m0_addb2_storage_init(const char *location, uint64_t key, bool mkfs, bool force, const struct m0_addb2_storage_ops *ops, m0_bcount_t size, void *cookie)
M0_INTERNAL int m0_stob_domain_init(const char *location, const char *str_cfg_init, struct m0_stob_domain **out)
int m0_addb2_sit_next(struct m0_addb2_sit *it, struct m0_addb2_record **out)
struct m0_addb2_value ar_val
#define M0_ALLOC_PTR(ptr)
static unsigned traces_submitted
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
static void io_thread(int x)
M0_INTERNAL int m0_addb2_storage_submit(struct m0_addb2_storage *stor, struct m0_addb2_trace_obj *obj)
static void stor_fini(void)
bool valeq(const struct m0_addb2_value *v0, const struct m0_addb2_value *v1)
static struct m0_semaphore idlewait
M0_INTERNAL int m0_stob_find(const struct m0_stob_id *id, struct m0_stob **out)
struct m0_ut_suite addb2_storage_ut
static void stob_get(void)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static void mach_idle(const struct m0_addb2_mach *mach)
static struct m0_addb2_frame_header last
void m0_addb2_sit_fini(struct m0_addb2_sit *it)